SQL Language (MOSC)

MOSC Banner

Strange failure with to_date

edited Dec 21, 2013 12:19AM in SQL Language (MOSC) 7 commentsAnswered
 select to_char(to_date('1900','yyyy'),'yyyymmdd') from dual;
returns 

19001101

If you put the month in it's correct

select to_char(to_date('190001','yyyymm'),'yyyymmdd') from dual;

returns

19000101

This applies to all years that I have looked at.

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center