One module in Visual Basic is DateAndTime . Which contains date values, time values, or date and time values. As a programmer, there are cases that we always display the date and time in our application or web application. Using visual basic we can manipulate dates and times in many ways. To do this, open and visual basic and create a new project and save it as “Datetime”. And add a button to our form, then double click it and add the following code.
DateAndTime.Now) '10/21/2013 10;37:23 AM
MsgBox(Date.Now.ToLongDateString) 'Monday, October 21, 2013