Difference between revisions of "SECONDS()"

From Lianjapedia
Jump to: navigation, search
Line 9: Line 9:
  
 
==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>.
+
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>
  

Revision as of 05:22, 9 June 2015

Purpose

Function to extract seconds from a time string

Syntax

SECONDS([<time-string>])

See Also

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

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