May 26 2009

Oracle: Date manipulation

I’m just listing this because I ALWAYS forget the syntax for this small stuff.

Converting Varchar2 to Date:

SELECT to_date('01-JUL-2009','dd-mon-yyyy') 
FROM Dual;

Using todays date to build a relative date:

SELECT trunc(sysdate + 36) 
FROM Dual;
Comments (View)
blog comments powered by Disqus

Please...

Leave a comment if this has helped or offended you.

StackOverflow Id