Skip to main content

This is documentation for Caché & Ensemble. See the InterSystems IRIS version of this content.

For information on migrating to InterSystems IRIS, see Why Migrate to InterSystems IRIS?

Time

Returns the current system time.

Synopsis

Time

Arguments

none

Description

The Time function returns the current time in a format such as the following:

00:00:00PM

In this case, time is represented by a 12–hour clock with an AM/PM indicator and no fractional seconds. The exact display format depends on your system configuration. Leading zeros are displayed.

Examples

The following example uses the Time function to return the current system time:

Dim MyTime
MyTime = Time
Println MyTime

See Also

  • Basic: Date function, Now function

  • ObjectScript: $HOROLOG special variable

  • SQL: NOW function

Feedback