🎴 Flashcard Mode
Mainframe Systems: CICS, JCL, and DB2 Fundamentals
Card1 / 16
Mastered0
Review0
QuestionClick to flip
Select query for a date field should be
AnswerClick to flip back
A
SELECT CHAR(CAST (tablename.Date_variable AS DATE), ISO)
💡 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.