Thursday, May 17, 2012

Date Format RRRR-MM-DD HH24:MI:SS

One of my colleague used following condition in a query



The query did not show any result. i looked into the query and thought date format is completely incorrect. then i thought why no error? so i ran this query and got the answer.

select to_date('30-APR-2012', 'RRRR-MM-DD HH24:MI:SS') from dual

The above query gave 20th Apr 2030

No comments:

Post a Comment