Converting a DATE value into a DATETIME value

About this task

To convert a DATE value into a DATETIME value:

Procedure

  1. Declare a variable with a qualifier of year to day (or initialize the qualifier with the value that the TU_DTENCODE (TU_YEAR,TU_DAY) macro returns).
  2. Use rfmtdate() with a pattern of yyyy-mm-dd to convert the DATE value to a character string.
  3. Use dtcvasc() to convert the character string to a value in the prepared DATETIME variable.
  4. If necessary, use dtextend() to adjust the DATETIME qualifier.