QuestionQ213

VerifiedUsing Single-Row Functions to Customize Output

You need to show the date 11-Oct-2007 in words as ‘Eleventh of October, Two Thousand Seven’. Which SQL statement produces the required result?

Explanation

Oracle datetime format suffixes SPTH and THSP spell a numeric date element as an ordinal word, so DDTHSP produces Eleventh. Month and Year produce title-case spelled month and year values, quoted text reproduces the literal of, and TO_DATE supplies the DATE value for TO_CHAR to format.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!