Difference between revisions of "SECONDS()"

From Lianjapedia
Jump to: navigation, search
 
(See Also)
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
==Purpose==
 
==Purpose==
 
Function to extract seconds from a time string
 
Function to extract seconds from a time string
 
  
 
==Syntax==
 
==Syntax==
 
SECONDS([<time-string>])
 
SECONDS([<time-string>])
 
  
 
==See Also==
 
==See Also==
[[AMPM()]], [[CTOT()]], [[DATE()]], [[DATETIME()]], [[ELAPTIME()]], [[HOUR()]], [[HOURS()]], [[MINUTE()]], [[MINUTES()]], [[SEC()]], [[SECS()]], [[SET CLIPPER]], [[SET CLOCK]], [[SET CLOCKRATE]], [[SET SECONDS]], [[SET VAXTIME]], [[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()]], [[SECS()]], [[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 SECONDS() function returns the seconds from the current time as a number.  The SECONDS() function will also return the seconds from an optionally specified <time-string>.  If the command SET CLIPPER is ON, the SECONDS() function operates in the same way as the SECS() function.
+
The SECONDS() function returns the seconds elapsed since midnight from the current system time as a number.  The SECONDS() function will also return the elapsed seconds since midnight from an optionally specified <time-string>.
  
 +
From Lianja v2.0 milliseconds are included for the returned current system time.
  
 
==Example==
 
==Example==
 
<code lang="recital">
 
<code lang="recital">
? seconds("10:33:21")
+
? seconds("10:13:21")
        21
+
    38601
 +
// From Lianja v2.0
 +
? seconds()
 +
36834.470
 
</code>
 
</code>
  
 
==Products==
 
Recital, Recital Server
 
 
[[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]]

Latest revision as of 11:24, 7 October 2019

Purpose

Function to extract seconds from a time string

Syntax

SECONDS([<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(), SECS(), 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 SECONDS() function returns the seconds elapsed since midnight from the current system time as a number. The SECONDS() function will also return the elapsed seconds since midnight from an optionally specified <time-string>.

From Lianja v2.0 milliseconds are included for the returned current system time.

Example

? seconds("10:13:21")
     38601
// From Lianja v2.0
? seconds()
 36834.470