Multiple choice technology mainframe

Select query for a date field should be

  1. SELECT DATE(tablename.Date_variable, ISO)

  2. SELECT (tablename.Date_variable AS DATE)

  3. SELECT CHAR(CAST (tablename.Date_variable AS DATE), ISO)

  4. ALL OF THEM

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

In DB2, converting a date field to a specific character string format is done using the CHAR() function with the date value and an optional format identifier like ISO. The syntax CHAR(CAST(column AS DATE), ISO) is syntactically valid and returns the formatted date string.