TIMEOFDAY()
Contents
Purpose
Function to return the current system time in a specified format
Syntax
TIMEOFDAY([<expN>])
See Also
AMPM(), CDOW(), CMONTH(), CTOD(), CTOT(), DATE(), DATETIME(), DAY(), DAYS(), DMY(), DOW(), DTOA(), DTOC(), DTOM(), DTOS(), DTOT(), DTOV(), ELAPTIME(), EMPTY(), EPOCH(), GOMONTH(), HOUR(), HOURS(), ISLEAPYEAR(), LEAPYEARS(), LTOS(), MDY(), MINUTE(), MINUTES(), MONTH(), MTOD(), MTOS(), QUARTER(), SEC(), SECONDS(), SECS(), SET CENTURY, SET DATE, SET EPOCH, SET HOURS, SET MARK, SET SECONDS, STOD(), STOT(), STR(), STRFTIME(), TIME(), TIMESTAMP(), TSTRING(), TTOC(), TTOD(), TYPE(), VAL(), VALIDTIME(), VTOD(), WEEK(), YEAR()
Description
The TIMEOFDAY() function returns the current system time as a character string in the following formats.
<expN> | Description |
---|---|
Same as TIME() hh:mm:ss | |
0 | Same as TIME() hh:mm:ss |
1 | xxx (milliseconds) |
2 | hh:mm:ss:xxx (24hr) |
3 | ss:xxx since midnight |
4 | ss:xxx since TIMEOFDAY() last called |
5 | YYYYMMDDhh:mm:ss |
6 | YYYYMMDD |
7 | ss:xxx since TIMEOFDAY() last called.
Includes text postfix 'ms' (less than 1 second) or ' seconds' (more than 1 second). |
Example
// hh:mm:ss > ? timeofday() 14:43:26 > ? timeofday(0) 14:43:26 // xxx (milliseconds) > ? timeofday(1) 482 // hh:mm:ss:xxx (24hr) > ? timeofday(2) 14:44:41.012 // ss:xxx since midnight > ? timeofday(3) 53088.540 // ss:xxx since TIMEOFDAY() last called > ? timeofday(4) 5.248 // YYYYMMDDhh:mm:ss > ? timeofday(5) 2015110614:44:58 // YYYYMMDD > ? timeofday(6) 20151106 // ss:xxx since TIMEOFDAY() last called with text postfix > ? timeofday(7) 5.248 seconds