2. Slip-1 Problem Statement
Q. Design a VB.NET form to pick a date from DateTimePicker Control and display day, month, and year in separate text boxes. 15 Marks
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
