this may be a dumb question however.. I have these two selects: 1st one returns a result, while 2nd gives me a not a valid month error. I can't seem to figure out why..
select to_date('09-12-14','dd-mm-rr') - to_date('01/january/2007') from dual;
select to_date('09-12-14','dd-mm-rr') - to_date('01-01-2007') from dual;
Tnx in advance
When you don't specify a format mask, Oracle will use the
NLS_DATE_FORMAT
setting (and some predefined masks) to determine the date time format mask.Apparently your server settings support the first format, and not the second. Therefore it is better to always specify your format mask.