Export (0) Print
Expand All

Now Property 

Returns a Date value containing the current date and time according to your system.


ReadOnly Public Property Now() As DateTime

To set the system date, use the Today Property. To set the system time, use the TimeOfDay Property.

The following example uses the Now property to return the current system date and time.

Dim ThisMoment As Date
' The following statement calls the Get procedure of the Visual Basic Now property.
ThisMoment = Now

Namespace: Microsoft.VisualBasic

Module: DateAndTime

Assembly: Visual Basic Runtime Library (in Microsoft.VisualBasic.dll)

Because Now is a member of a module, rather than of a class, you do not need to create an object on which to access Now.

Community Additions

ADD
Show:
© 2014 Microsoft