How to check if a date is a valid date in Oracle?
983611Jan 8 2013 — edited Jan 10 2013Hello,
I have a date '0212-09-17', and it seems Oracle did accept it when I stored it in a table (column type = DATE).
However, when it was flowing downstream into other servers such as SQL server, it caused issues, because SQL treats it as an invalid date.
Then I added in a check to check if dates like the above is valid before flowing downstream.
But surprisingly if i use TO_DATE('0212-09-17, 'YYYY-MM-DD') it seems to return a valid date... but the year doesn't look right.
I did a bit of research on google, didn't find good answers on this. Can you tell me what would be the best way to check for
valid dates in Oracle?
Much appreciated,