sdayofwk(X)
Returns the text value corresponding to the day of the week of a date-related value.
Syntax
sdayofwk(X)
Input
Argument | Type | Description |
---|---|---|
X |
any numeric type | 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 text value (e.g., sun=Sunday, mon=Monday, etc.) corresponding to the day of the week of the date-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
In the Hourly U.S. Weather (1993) table
(pub.demo.weather.hourly93), you can create a computed column that
displays a text value corresponding to the day of the week of the date
value in the column named date
:
<base table="pub.demo.weather.hourly93"/> <willbe name="example" value="sdayofwk(date)" label="Day of Week"/> <colord cols="date,example"/>
For a date value of 09/21/93
(X
=19930921), the result would be tue.
For a date value of 05/26/93
(X
=19930526), the result would be wed.