time(X)
Returns the time portion of a date+time value.
Syntax
time(X)
Input
Argument | Type | Description |
---|---|---|
X |
decimal | 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 (HHMMSS) corresponding to the time for a date+time 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 time(X)
function to get just the time portion of it.
<base table="default.lonely" label="Example: time(X)"/> <willbe name="login_date_time" value="logindatetime(-5)" label="Login Date/Time" format="type:datehms24"/> <willbe name="login_time" value="time(login_date_time)" label="Login Time" format="type:hms24"/> <colord cols="login_date_time,login_time"/>