Converting a DATETIME value to a DATE value
To convert a DATETIME value to a DATE value:
- 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.