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

Remarks

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

Example

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

Dim ThisMoment As Date
ThisMoment= Now   ' Assign current system date and time.

Requirements

Namespace: Microsoft.VisualBasic

Module: DateAndTime

Assembly: Microsoft Visual Basic .NET Runtime (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.

See Also

Day Function | Hour Function | Minute Function | Month Function | Second Function | TimeOfDay Property | Weekday Function | Year Function | TimeOfDay Property | Today Property | Date Data Type | System Namespace | DateTime Structure | ArgumentOutOfRangeException Class

Show:
© 2014 Microsoft