Name

Time Function

Syntax

Time

Return Value

A Date.

Description

Returns the current system time.

Rules at a Glance

The Time function returns the time.

Programming Tips and Gotchas

The Time function returns but does not allow you to set the system time.

VBA/VBScript Differences

VBA includes a Time$ function that returns the time as a string rather than a variant. Because VBScript does not support strong typing, the function is not implemented in VBScript.

See Also

Now Function

Get VBScript in a Nutshell, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.