Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: oracle question to get Date minus 1

Re: oracle question to get Date minus 1

From: Leslie Sox <Leslie.Sox_at_gmail.com>
Date: 28 Sep 2006 18:24:32 -0700
Message-ID: <1159493072.107632.77890@m7g2000cwm.googlegroups.com>


I found some information on this webpage. Hope it helps.

I got this from http://www.orafusion.com/art_dt.htm

Date arithmetic and date functions :

Adding / subtracting days to / from dates is as simple as adding numbers. Witness:

--subtract 10 days

SQL> select dt - 10 from date_test;

DT-10



11/07/2006 13:58:31

This also works for hours, minutes and seconds:

--subtract 3 hrs from date

SQL> select dt-3/24 from date_test;

DT-3/24



21/07/2006 10:58:31 Received on Thu Sep 28 2006 - 20:24:32 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US