Difference between revisions of "SECS()"
Yvonne.milne (Talk | contribs) m (1 revision) |
Yvonne.milne (Talk | contribs) (→See Also) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
==Purpose== | ==Purpose== | ||
Function to return the number of seconds since midnight | Function to return the number of seconds since midnight | ||
− | |||
==Syntax== | ==Syntax== | ||
SECS([<time-string>]) | SECS([<time-string>]) | ||
− | |||
==See Also== | ==See Also== | ||
− | [[AMPM()]], [[CTOT()]], [[DATE()]], [[DATETIME()]], [[ELAPTIME()]], [[HOUR()]], [[HOURS()]], [[MINUTE()]], [[MINUTES()]], [[SEC()]], [[SECONDS()]], [[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()]], [[SET CENTURY]], [[SET DATE]], [[SET EPOCH]], [[SET HOURS]], [[SET MARK]], [[SET SECONDS]], [[STOD()]], [[STOT()]], [[STR()]], [[STRFTIME()]], [[TIME()]], [[TIMEOFDAY()]], [[TIMESTAMP()]], [[TSTRING()]], [[TTOC()]], [[TTOD()]], [[TYPE()]], [[VAL()]], [[VALIDTIME()]], [[VTOD()]], [[WEEK()]], [[YEAR()]] |
− | + | ||
==Description== | ==Description== | ||
− | The SECS() function returns the number of seconds since midnight. The optional <time-string>, in the format HH:MM:SS, may be used to specify a time. If no <time-string> is passed, the SECS() function uses the current time. This function can be used to store time as seconds in a numeric field. The TSTRING() function is used to convert the seconds back to a time-string | + | The SECS() function returns the number of seconds since midnight. The optional <time-string>, in the format HH:MM:SS, may be used to specify a time. If no <time-string> is passed, the SECS() function uses the current time. This function can be used to store time as seconds in a numeric field. The TSTRING() function is used to convert the seconds back to a time-string. |
+ | From Lianja v2.0 milliseconds are included for the returned current system time. | ||
==Example== | ==Example== | ||
Line 29: | Line 27: | ||
</code> | </code> | ||
− | |||
− | |||
− | |||
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Functions]] | [[Category:Functions]] | ||
− | |||
[[Category:Date and Time Data Functions]] | [[Category:Date and Time Data Functions]] |
Latest revision as of 11:24, 7 October 2019
Contents
Purpose
Function to return the number of seconds since midnight
Syntax
SECS([<time-string>])
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(), SET CENTURY, SET DATE, SET EPOCH, SET HOURS, SET MARK, SET SECONDS, STOD(), STOT(), STR(), STRFTIME(), TIME(), TIMEOFDAY(), TIMESTAMP(), TSTRING(), TTOC(), TTOD(), TYPE(), VAL(), VALIDTIME(), VTOD(), WEEK(), YEAR()
Description
The SECS() function returns the number of seconds since midnight. The optional <time-string>, in the format HH:MM:SS, may be used to specify a time. If no <time-string> is passed, the SECS() function uses the current time. This function can be used to store time as seconds in a numeric field. The TSTRING() function is used to convert the seconds back to a time-string.
From Lianja v2.0 milliseconds are included for the returned current system time.
Example
? secs("10:10:10") 36610 // Another Example use accounts replace seconds with secs(time()) ? seconds 39306 ? tstring(seconds) 10:55:00