Time

Return the current system time.

Syntax
      Time

The Time() function can be used in VBA or in an SQL query.

Time() will return a Variant, you can also use Time$() to return a String.
You should use Time() if there is any chance of a Null value, since assigning Null to a String will raise an error.

Examples

dim dtmCreated
dtmCreated = Time

“Beauty is Nature’s coin, must not be hoarded, but must be current” ~ John Milton

Related

Now - Return the current date and time.
Date - Return the current date.


 
Copyright © 1999-2026 SS64.com
Some rights reserved