The DateTimePicker control allows you to display and collect date and time from the user with a specified format.
The DateTimePicker control prompts the user for a date or time using a graphical calendar with scroll arrows. The most important property of the DateTimePicker is the Value property, which holds the selected date and time.
The Value property is set to the current date by default. You can use the Text property or the appropriate
member of Value to get the date and time value.
The control can display one of several styles, depending on its property values. The values can be displayed in four
formats, which are set by the Format property: Long, Short, Time, or Custom.
The following VB.Net program shows how to set and get the value of a DateTimePicker1 control.