Skip to main content

Dates and Times

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.
  2. MsgBox(DateAndTime.Now) '10/21/2013 10;37:23 AM
  3. MsgBox(Date.Now.ToLongDateString) 'Monday, October 21, 2013
  4. MsgBox(Date.Now


Add new comment