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: Is there a dateadd() function?

Re: Is there a dateadd() function?

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Tue, 21 Jul 1998 15:58:42 GMT
Message-ID: <35b9ba87.11619608@192.86.155.100>


A copy of this was sent to Daniel Kosolofski <daniel.kosolofski_at_cgi.ca> (if that email address didn't require changing) On Tue, 21 Jul 1998 14:47:40 GMT, you wrote:

>I am used to using SQl Server and not
>Oracle so I am not totaly familiar with
>the systax.
>
>So on that note my question is how do
>you add/subtract dates (specifically
>hours) .
>E.g. ('02/jun/1998 12:00 A.M' - 3 hours)
>I know in SQL Server there is a dateadd
>function.
>Is there the same thing in oracle.
>
>I am currently on holidays and have no
>access to books so please send syntax or
>example. PLEASE!!
>
>Thank You all for the help in advance!

sysdate = right now
sysdate+1 = 1 day later

sysdate+1/24 = 1 hour later

sysdate+1/24/60 = 1 minute later

and so on. Just add/subtract portions of days from dates...  

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Herndon VA  

http://govt.us.oracle.com/ -- downloadable utilities  



Opinions are mine and do not necessarily reflect those of Oracle Corporation  

Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it. Received on Tue Jul 21 1998 - 10:58:42 CDT

Original text of this message

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