TIMEDATE Function

The TIMEDATE function returns the current system time and date in external format.

Format

TIMEDATE( )

Description

The current time and date is returned by the TIMEDATE function in this form:

HH:MM:SS   DD   MMM   YYYY

HH

Hours (based on 24-hour clock)

MM

Minutes

SS

Seconds

DD

Day

MMM

Month

YYYY

Year

To receive the current time and date in internal format, the TIME and DATE functions may be used. The TIME function returns the number of seconds since midnight, and the DATE function returns the number of days since December 31, 1967. See TIME Function and DATE Function for more information.

Example

In this application, the current time is shown at the beginning of the program. To get the current time, the TIMEDATE function is used and the date is stripped out with the FIELD function.

CURR.TIME = TIMEDATE( )

CURR.TIME = FIELD(CURR.TIME," ",1)

PRINT "BEGINNING THIS SESSION AT " : CURR.TIME

See Also

Statement and Function Reference