VB.NET DateTimePicker Control
The DateTimePicker control allows the user to select or display date and time values with a specified format in Windows Forms. Furthermore, we can determine the current date and time using the Value property of the DateTimePicker control. By default, the Value property returns the current date and time in the DateTimePicker.
Let's create a DateTimePicker control in the VB.NET Windows form using the following steps.
Step 1: The first step is to drag the DateTimePicker control from the toolbox and drop it on to the form.
Step 2: Once the DateTimePicker is added to the form, we can set various properties of the DateTimePicker by clicking on the DateTimePicker control.
Note: The MinDate and MaxDate property of the DateTimePicker control allows the user to set the limits on the date range.
Properties of the DateTimePicker Control
There are some properties of the VB.NET DateTimePicker control.
Methods of the DateTimePicker Control
There are some Methods of the VB.NET DateTimePicker control.
Furthermore, we can also refer to VB.NET Microsoft documentation to get a complete list of DateTimePicker control properties, and methods in the VB.NET.
Let's create a program of DateTimePicker control in the VB.NET form.
Now, we select the date of birth from the DateTimePicker Control.
After selecting the DOB and the Current date from the DateTimePicker Control, now click on the Calculate button, and it shows the following result.