Converting a DATETIME value to a DATE value
About this task
To convert a DATETIME value to a DATE value:
Procedure
- Use dtextend() to adjust the DATETIME qualifier to year to day.
- Apply dttoasc() to create a character
string in the form
yyyy-mm-dd
. - Use rdefmtdate() with a pattern argument
of
yyyy-mm-dd
to convert the string to a DATE value.