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: <nasof_at_hotmail.com>
Date: Tue, 21 Jul 1998 18:53:34 GMT
Message-ID: <6p2o3d$36p$1@nnrp1.dejanews.com>


To add 3 hours to the current time:
select to_char(sysdate, 'dd/mm/yy hh24:mi:ss') from dual;

TO_CHAR(SYSDATE,'



07/21/98 14:49:06

select to_char(sysdate+(1/24)*3, 'mm/dd/yy hh24:mi:ss') from dual;

TO_CHAR(SYSDATE+(



07/21/98 17:49:07

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

Original text of this message

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