Difference between revisions of "TIMEOFDAY()"
Yvonne.milne (Talk | contribs) m (1 revision) |
Yvonne.milne (Talk | contribs) (→See Also) |
||
(9 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
==Purpose== | ==Purpose== | ||
Function to return the current system time in a specified format | Function to return the current system time in a specified format | ||
− | |||
==Syntax== | ==Syntax== | ||
TIMEOFDAY([<expN>]) | TIMEOFDAY([<expN>]) | ||
− | |||
==See Also== | ==See Also== | ||
− | [[AMPM()]], [[CTOT()]], [[DATE()]], [[DATETIME()]], [[ELAPTIME()]], [[HOUR()]], [[HOURS()]], [[MINUTE()]], [[MINUTES()]], [[SEC()]], [[SECONDS()]], [[SECS()]], [[SET | + | [[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== | ==Description== | ||
The TIMEOFDAY() function returns the current system time as a character string in the following formats. | The TIMEOFDAY() function returns the current system time as a character string in the following formats. | ||
− | + | {| class="wikitable" width="100%" | |
− | {| class="wikitable" | + | !width="30%"|<expN>||Description |
− | !<expN>||Description | + | |
|- | |- | ||
| ||Same as TIME() hh:mm:ss | | ||Same as TIME() hh:mm:ss | ||
|- | |- | ||
− | | | + | |0||Same as TIME() hh:mm:ss |
+ | |- | ||
+ | |1||xxx (milliseconds) | ||
|- | |- | ||
|2||hh:mm:ss:xxx (24hr) | |2||hh:mm:ss:xxx (24hr) | ||
|- | |- | ||
− | |3|| | + | |3||ss:xxx since midnight |
|- | |- | ||
− | |4|| | + | |4||ss:xxx since TIMEOFDAY() last called |
|- | |- | ||
|5||YYYYMMDDhh:mm:ss | |5||YYYYMMDDhh:mm:ss | ||
+ | |- | ||
+ | |6||YYYYMMDD | ||
+ | |- | ||
+ | |valign="top"|7||ss:xxx since TIMEOFDAY() last called. | ||
+ | Includes text postfix 'ms' (less than 1 second) or ' seconds' (more than 1 second). | ||
|- | |- | ||
|} | |} | ||
− | |||
==Example== | ==Example== | ||
Line 38: | Line 40: | ||
> ? timeofday() | > ? timeofday() | ||
14:43:26 | 14:43:26 | ||
− | + | > ? timeofday(0) | |
+ | 14:43:26 | ||
+ | // xxx (milliseconds) | ||
> ? timeofday(1) | > ? timeofday(1) | ||
− | + | 482 | |
// hh:mm:ss:xxx (24hr) | // hh:mm:ss:xxx (24hr) | ||
> ? timeofday(2) | > ? timeofday(2) | ||
14:44:41.012 | 14:44:41.012 | ||
− | // | + | // ss:xxx since midnight |
> ? timeofday(3) | > ? timeofday(3) | ||
53088.540 | 53088.540 | ||
− | // | + | // ss:xxx since TIMEOFDAY() last called |
> ? timeofday(4) | > ? timeofday(4) | ||
5.248 | 5.248 | ||
− | //YYYYMMDDhh:mm:ss | + | // YYYYMMDDhh:mm:ss |
> ? timeofday(5) | > ? timeofday(5) | ||
− | + | 2015110614:44:58 | |
+ | // YYYYMMDD | ||
+ | > ? timeofday(6) | ||
+ | 20151106 | ||
+ | // ss:xxx since TIMEOFDAY() last called with text postfix | ||
+ | > ? timeofday(7) | ||
+ | 5.248 seconds | ||
</code> | </code> | ||
− | |||
− | |||
− | |||
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Functions]] | [[Category:Functions]] | ||
− | |||
[[Category:Date and Time Data Functions]] | [[Category:Date and Time Data Functions]] | ||
+ | [[Category:Lianja VFP Extensions]] | ||
+ | [[Category:VFP Function Extensions]] |
Latest revision as of 08:46, 8 October 2019
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