Simple Dates Subtraction
958205Aug 27 2012 — edited Aug 27 2012Hello guis, i'm new here. I'm studying for iz0-051 certification exam and I would really appreciate if you can help me out with this doubt i have..
I know that a character literal can be implicitly converted to a date if it follows the mask '[dd,DD] separator [mm,MM,Mon] separator [yy,rr,yyyy] etc..etc...
then.. why doesn't this simple subtraction go through (number of days between a certain date and the current sysdate)?
select sysdate - '01-jan-2012' from dual;
it gives "ora-01722 invalid number" error, shouldn't it implicitly convert the literal to a date and then subtract it from sysdate? what am I doing wrong?
thanks for your help,
Paolo