Multiple choice technology databases

What's the output select to_Date('2009-may-25','yyyymmdd') from dual

  1. 20090525

  2. Error

  3. 2009-may-25

  4. may-25-2009

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

The TO_DATE function expects the input string to match the specified format. '2009-may-25' contains a textual month abbreviation, but the format 'yyyymmdd' expects digits. The correct format would be 'yyyy-mon-dd' or similar, or the input should be '20090525'. The mismatch between textual month and numeric format causes an error.