selecting n days less than today in Oracle

(select to_char(sysdate-1) from dual)


(select to_char(sysdate-2) from dual)


(select to_char(sysdate-3) from dual)


(select to_char(sysdate-n) from dual)

// Presenting data in Various formats

select sysdate-1 from dual

select to_char(sysdate-1,’mmddyyyy’) from dual

select to_char(sysdate-1,’ddmmyyyy’) from dual

select to_char(sysdate-1,’mmddyy’) from dual

select to_char(sysdate-1,’mm/dd/yyyy’) from dual

select to_char(sysdate-1,’dd-mm-yyyy’) from dual


About kakani santosh kumar

Working as Software Engineer in Prithvi Information Solutions having 3 years of Experience in Dotnet Framework ranging from 1.1 to 3.5
This entry was posted in Database. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s