Difference between revisions of "TIMEOFDAY()"

From Lianjapedia
Jump to: navigation, search
(See Also)
 
(8 intermediate revisions by 3 users not shown)
Line 6: Line 6:
  
 
==See Also==
 
==See Also==
[[AMPM()]], [[CTOT()]], [[DATE()]], [[DATETIME()]], [[ELAPTIME()]], [[HOUR()]], [[HOURS()]], [[MINUTE()]], [[MINUTES()]], [[SEC()]], [[SECONDS()]], [[SECS()]], [[SET SECONDS]], [[SYS()]], [[TIME()]], [[TIMESTAMP()]], [[TSTRING()]], [[TTOC()]], [[TTOD()]], [[VALIDTIME()]]
+
[[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"
+
{| class="wikitable" width="100%"
!<expN>||Description
+
!width="30%"|<expN>||Description
 
|-
 
|-
 
| ||Same as TIME() hh:mm:ss
 
| ||Same as TIME() hh:mm:ss
 
|-
 
|-
|1||MM-DD-YYYY hh:mm:ss:xxx (24hr)
+
|0||Same as TIME() hh:mm:ss
 +
|-
 +
|1||xxx (milliseconds)
 
|-
 
|-
 
|2||hh:mm:ss:xxx (24hr)
 
|2||hh:mm:ss:xxx (24hr)
 
|-
 
|-
|3||Seconds since midnight
+
|3||ss:xxx since midnight
 
|-
 
|-
|4||Seconds since TIMEOFDAY() last called
+
|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).
 
|-
 
|-
 
|}
 
|}
Line 33: Line 40:
 
> ? timeofday()
 
> ? timeofday()
 
14:43:26
 
14:43:26
//MM-DD-YYYY hh:mm:ss:xxx (24hr)
+
> ? timeofday(0)
 +
14:43:26
 +
// xxx (milliseconds)
 
> ? timeofday(1)
 
> ? timeofday(1)
11-06-2009 14:44:33.036
+
482
 
// hh:mm:ss:xxx (24hr)
 
// hh:mm:ss:xxx (24hr)
 
> ? timeofday(2)
 
> ? timeofday(2)
 
14:44:41.012
 
14:44:41.012
//seconds since midnight
+
// ss:xxx since midnight
 
> ? timeofday(3)
 
> ? timeofday(3)
 
53088.540
 
53088.540
//seconds since TIMEOFDAY() last called
+
// ss:xxx since TIMEOFDAY() last called
 
> ? timeofday(4)
 
> ? timeofday(4)
 
5.248
 
5.248
//YYYYMMDDhh:mm:ss
+
// YYYYMMDDhh:mm:ss
 
> ? timeofday(5)
 
> ? timeofday(5)
2009110614:44:58
+
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]]
 
 
[[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

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