Difference between revisions of "TIMEOFDAY()"

From Recital Documentation Wiki
Jump to: navigation, search
 
(4 intermediate revisions by one user not shown)
Line 1: Line 1:
{{YLM to do}}
+
==Purpose==
<pre>
+
Function to return the current system time in a specified format
//same as time() - whole seconds only
+
 
 +
 
 +
==Syntax==
 +
TIMEOFDAY([<expN>])
 +
 
 +
 
 +
==See Also==
 +
[[AMPM()]], [[CTOT()]], [[DATE()]], [[DATETIME()]], [[ELAPTIME()]], [[HOUR()]], [[HOURS()]], [[MINUTE()]], [[MINUTES()]], [[SEC()]], [[SECONDS()]], [[SECS()]], [[SET CLOCK]], [[SET CLOCKRATE]], [[SET SECONDS]], [[SYS()]], [[TIME()]], [[TIMESTAMP()]], [[TSTRING()]], [[TTOC()]], [[TTOD()]], [[VALIDTIME()]]
 +
 
 +
 
 +
==Description==
 +
The TIMEOFDAY() function returns the current system time as a character string in the following formats.
 +
 
 +
 
 +
{| class="wikitable"
 +
!<expN>||Description
 +
|-
 +
| ||Same as TIME() hh:mm:ss
 +
|-
 +
|1||MM-DD-YYYY hh:mm:ss:xxx (24hr)
 +
|-
 +
|2||hh:mm:ss:xxx (24hr)
 +
|-
 +
|3||Seconds since midnight
 +
|-
 +
|4||Seconds since TIMEOFDAY() last called
 +
|-
 +
|5||YYYYMMDDhh:mm:ss
 +
|-
 +
|}
 +
 
 +
 
 +
==Example==
 +
<code lang="recital">
 +
// hh:mm:ss
 
> ? timeofday()
 
> ? timeofday()
 
14:43:26
 
14:43:26
//date mm-dd-yyyy hh:mm:ss:xxx
+
//MM-DD-YYYY hh:mm:ss:xxx (24hr)
 
> ? timeofday(1)
 
> ? timeofday(1)
 
11-06-2009 14:44:33.036
 
11-06-2009 14:44:33.036
 +
// hh:mm:ss:xxx (24hr)
 
> ? timeofday(2)
 
> ? timeofday(2)
 
14:44:41.012
 
14:44:41.012
Line 12: Line 47:
 
> ? timeofday(3)
 
> ? timeofday(3)
 
53088.540
 
53088.540
 +
//seconds since TIMEOFDAY() last called
 
> ? timeofday(4)
 
> ? timeofday(4)
 
5.248
 
5.248
 +
//YYYYMMDDhh:mm:ss
 
> ? timeofday(5)
 
> ? timeofday(5)
 
2009110614:44:58
 
2009110614:44:58
</pre>
+
</code>
 +
 
 +
 
 +
==Products==
 +
Recital, Recital Server
 +
[[Category:Documentation]]
 +
[[Category:Functions]]
 +
[[Category:Date and Time Data]]
 +
[[Category:Date and Time Data Functions]]

Latest revision as of 12:32, 13 January 2010

Purpose

Function to return the current system time in a specified format


Syntax

TIMEOFDAY([<expN>])


See Also

AMPM(), CTOT(), DATE(), DATETIME(), ELAPTIME(), HOUR(), HOURS(), MINUTE(), MINUTES(), SEC(), SECONDS(), SECS(), SET CLOCK, SET CLOCKRATE, SET SECONDS, SYS(), TIME(), TIMESTAMP(), TSTRING(), TTOC(), TTOD(), VALIDTIME()


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
1 MM-DD-YYYY hh:mm:ss:xxx (24hr)
2 hh:mm:ss:xxx (24hr)
3 Seconds since midnight
4 Seconds since TIMEOFDAY() last called
5 YYYYMMDDhh:mm:ss


Example

// hh:mm:ss
> ? timeofday()
14:43:26
//MM-DD-YYYY hh:mm:ss:xxx (24hr)
> ? timeofday(1)
11-06-2009 14:44:33.036
// hh:mm:ss:xxx (24hr)
> ? timeofday(2)
14:44:41.012
//seconds since midnight
> ? timeofday(3)
53088.540
//seconds since TIMEOFDAY() last called
> ? timeofday(4)
5.248
//YYYYMMDDhh:mm:ss
> ? timeofday(5)
2009110614:44:58


Products

Recital, Recital Server