secs(X)
Returns the number of seconds from midnight to a time-related value.
Syntax
secs(X)
Input
Argument | Type | Description |
---|---|---|
X |
any numeric type | A scalar value or the name of a column containing time-related values Valid values can be of the form:
|
For more information, see Dates and time.
Return Value
Returns the integer value corresponding to the number of seconds from midnight to the time in the time-related value given as input.
If the input values are not in one of the supported formats listed above, the function returns an erroneous or illogical output.
Example
The following example gets the login date and time using the
logindatetime(X)
function and then uses the secs(X)
function to get the number of seconds from midnight to the login time.
<base table="default.lonely" label="Example: secs(X)"/> <willbe name="login_date_time" value="logindatetime(-5)" label="Login Date/Time" format="type:datehms24"/> <willbe name="login_secs" value="secs(login_date_time)" label="# of Seconds`Since Midnight"/> <colord cols="login_date_time,login_secs"/>