- Version
- Download 78
- File Size 105.45 KB
- File Count 1
- Create Date April 6, 2016
- Last Updated April 6, 2016
DTPicker Control in Visual Basic .Net
DTPicker Control in Visual Basic .Net
The DateTimePicker control enables you to provide a formatted date field that allows easy date selection. In addition, users can select a date from a dropdown calendar interface similar to the MonthView control.
This sample program will get the year, month, day and complete date and display it in the label control based on the date selected in the dtpicker control.
Source code:
Public Class Form1
Private Sub DateTimePicker1_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DateTimePicker1.ValueChanged
Label4.Text = MonthName(DateTimePicker1.Value.Month)
Label3.Text = Year(DateTimePicker1.Value)
Label6.Text = DateTimePicker1.Value.DayOfWeek.ToString
Label8.Text = DateTimePicker1.Value
End Sub
End Class