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

Home -> Community -> Usenet -> c.d.o.misc -> Re: how to change dates or times in a oracle date time field

Re: how to change dates or times in a oracle date time field

From: Mark D Powell <mark.powell_at_eds.com>
Date: 19 Jun 2002 14:03:34 -0700
Message-ID: <178d2795.0206191303.4def89d4@posting.google.com>


jwagans_at_yahoo.com (jim agans) wrote in message news:<82659da6.0206190605.43c1e69a_at_posting.google.com>...
> hi I have a QUESTION ON HOW TO ADD time to a oracle date field.
>
>
> What I would like to do is this:
>
> I would like to add some minutes to a date-time field ...the field looks like this
> 27-MAY-1999 12:01:01 AM
>
> HOW DO ADD like 8 minutes to this value and update??
>
> thanks
> jim agans

Jim the Oracle DATE datatype field is considered to be in days when involved in math operations so 8 minutes would be 8 / 1440 ( 60 min * 24 hrs).

UT1> select to_char(trunc(sysdate) + 8/1440,'YYYYMMDD HH24:MI:SS') from dual;

TO_CHAR(TRUNC(SYS



20020619 00:08:00

HTH -- Mark D Powell -- Received on Wed Jun 19 2002 - 16:03:34 CDT

Original text of this message

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