Current Date and Time (Tools/APIs) Contents Background Information Available Tools Note See Also Obtain the current date and time. Background Information ObjectScript provides a special variable ($HOROLOG) that you can use to obtain the current date and time; see Date and Time Values. Note that $HOROLOG is available within SQL queries (as are other special variables). Available Tools In addition, InterSystems provides the following tools: %SYSTEM.SYSOpens in a new tab class Includes the following class methods that return current date/time values: Horolog() TimeStamp() Availability: All namespaces. %Library.UtilityOpens in a new tab class Includes the following class methods that return current date/time values: Date() DateTime() Time() Availability: All namespaces. %Library.UTCOpens in a new tab class Includes the following class methods that return current date/time values: NowLocal() NowUTC() Availability: All namespaces. Note The special variable $SYSTEM is bound to the %SYSTEM package. This means that instead of ##class(%SYSTEM.class).method(), you can use $SYSTEM.class.method(). See Also Date/Time Values