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