QuestionQ112

VerifiedUsing Conversion Functions and Conditional Expressions

A session’s NLS_DATE_FORMAT is set to DD Mon YYYY.

Which two queries return the value 1 Jan 2019?

Choose two
Explanation

An ANSI DATE literal must use the YYYY-MM-DD form and is independent of the session’s NLS_DATE_FORMAT. TO_DATE converts a character value correctly when its explicit format model is YYYY-MM-DD. A TO_DATE call without a format model instead uses NLS_DATE_FORMAT, which is DD Mon YYYY here and does not match 2019-01-01.

Learn more

Community Discussion

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