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: Date difference problem in PL/SQL

Re: Date difference problem in PL/SQL

From: Mark D Powell <Mark.Powell_at_eds.com>
Date: 11 Nov 2003 16:51:41 -0800
Message-ID: <2687bb95.0311111651.62e6d13@posting.google.com>


Mark.Powell_at_eds.com (Mark D Powell) wrote in message news:<2687bb95.0311111126.3f354661_at_posting.google.com>...
> "Paul Tomlinson" <rubberducky703_at_hotmail.com> wrote in message news:<bor0k2$1hhjo0$1_at_ID-116287.news.uni-berlin.de>...
> > Hello,
> >
> > Does anyone have a routine which will return the (total) difference in
> > minutes between two dates?
> >
> > It doesn't look like Oracle provides any fancy date manipulation
> > functions....
> >
> > PT
>
> The difference is expressed in days and fractions thereof so just
> divide by the number of minutes in a day, 1440.
>
> HTH -- Mark D Powell --

OOPS! I meant multiply in this case

select
(to_date('30-10-2003 08:00:00','DD-MM-YYYY hh24:mi:ss') - to_date('30-10-2003 08:01:00','DD-MM-YYYY hh24:mi:ss')) * 1440 as "Diff in Min"
from sys.dual
/

Diff in Min



-1

HTH -- Mark D Powell -- Received on Tue Nov 11 2003 - 18:51:41 CST

Original text of this message

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