Visual Basic Language Reference  

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.

See Also

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