Design a VB.NET form to pick a date from DateTimePicker Control and display day, month, and year in separate text boxes.

Answer:

Public Class Form1
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Label1.Text = "Year : " & DateTimePicker1.Value.Year

        Label2.Text = "Month : " & DateTimePicker1.Value.Month

        Label3.Text = "Day : " & DateTimePicker1.Value.Day
    End Sub
End Class
Scroll to Top