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 sum minutes to date

Re: How to sum minutes to date

From: Mark D Powell <Mark.Powell_at_eds.com>
Date: 1 Apr 2004 08:57:49 -0800
Message-ID: <2687bb95.0404010857.6c67c622@posting.google.com>


"Niall Litchfield" <n-litchfield_at_audit-commission.gov.uk> wrote in message news:<406c008f$0$6552$ed9e5944_at_reading.news.pipex.net>...
> "Max" <m.daniello_at_rational-services.it> wrote in message
> news:c4gshi$2j5ia4$1_at_ID-224556.news.uni-berlin.de...
> > Hi all,
> > I need to sum x minutes to a date. Ex. the value I select is '01/01/2004
> > 12:30' and I need to sum '20' minutes so to obtain '01/01/2004 12:50'.
> > How could I do? I not find in Oracle 9i a function to sum time.
> > Thanks in advanced
>
> Hi
>
> well if you do normal math and add 1 to a date you add 24 hours to it and
> get the day afterwards. There are usually 1440 minutes in a day so 20
> minutes are 20/1440 of a day.

Mark and Niall have provided the answer. More information can be found in the SQL Manual under the topic "Date Arithmetic" in the section on the Date Datatype in the chapter on datatypes (ch 2 in ver 9.2 html) The phrase will also produce a hit in the Application Developers Guide that looks useful to anyone unfamilar with Oracle date handling features.

HTH -- Mark D Powell -- Received on Thu Apr 01 2004 - 10:57:49 CST

Original text of this message

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