You are here: Functions > TIME()

TIME()

Use TIME() to return the current time or the time portion of a DateTime field or expression. The time is returned as an eight byte character string in the format HH:MM:SS using a 24 hour clock.

Note: Any date portion of a DateTime value is ignored.

Function Format

TIME(<D>)

When called with no parameter, TIME() returns the current system time.

When the optional DateTime parameter D is specified, TIME() returns the time portion of the supplied DateTime field or expression.

Examples

Assuming a current system time of 3:38:52 PM,

TIME() = "15:38:52"

A time field LOGIN_TIME defines a field containing times in the format HH:MM:DD PM. Assuming an initial field value of 11:32:59 PM, the time function would convert the time field into the following character string (note the 24 hour clock output):

TIME(LOGIN_TIME) = “23:32:59”