Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Is there a dateadd() function?
To add 3 hours to the current time:
select to_char(sysdate, 'dd/mm/yy hh24:mi:ss') from dual;
TO_CHAR(SYSDATE,'
select to_char(sysdate+(1/24)*3, 'mm/dd/yy hh24:mi:ss') from dual;
TO_CHAR(SYSDATE+(
Substitute sysdate for the column you desire or to hardcode a date substitute sysdate with "to_date('07/21/98 14:49:06', 'mm/dd/yy hh24:mi:ss')"
-Frank
In article <35B4AA9B.BB726DFB_at_cgi.ca>,
Daniel Kosolofski <daniel.kosolofski_at_cgi.ca> 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!
>
> --
> Daniel Kosolofski
> Consultant
> CGI Information Systems and Management
> Consultants Inc.
> 333 Seventh Avenue S.W.
> Calgary, Alberta
> Canada T2P 2Z1
> Voice: (403) 233-2713
> Fax: (403) 262-8236
> Email: daniel.kosolofski_at_cgi.ca
>
-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum Received on Tue Jul 21 1998 - 13:53:34 CDT
![]() |
![]() |