QuestionQ106

VerifiedUsing Conversion Functions and Conditional Expressions

You need to display the date ll-oct-2007 in words as Eleventh of October, Two Thousand Seven.

Which SQL statement produces the required result?

Question Image

Explanation

Oracle’s TO_CHAR formats a DATE using a datetime format model. DDTHSP is a valid spelled-ordinal suffix combination and renders the day as Eleventh; Month and Year preserve title-style capitalization for the month and spelled-out year; and FM suppresses padding. TO_DATE converts the character date to a DATE value before formatting it.

Learn more

Community Discussion

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