Path: newssvr20.news.prodigy.com!newsmst01.news.prodigy.com!prodigy.com!prodigy.com!rip!news.webusenet.com!feed1.newsreader.com!newsreader.com!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!postnews1.google.com!not-for-mail
From: Mark.Powell@eds.com (Mark D Powell)
Newsgroups: comp.databases.oracle.misc
Subject: Re: Date difference problem in PL/SQL
Date: 11 Nov 2003 16:51:41 -0800
Organization: http://groups.google.com
Lines: 31
Message-ID: <2687bb95.0311111651.62e6d13@posting.google.com>
References: <bor0k2$1hhjo0$1@ID-116287.news.uni-berlin.de> <2687bb95.0311111126.3f354661@posting.google.com>
NNTP-Posting-Host: 68.42.97.55
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: posting.google.com 1068598302 17637 127.0.0.1 (12 Nov 2003 00:51:42 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Wed, 12 Nov 2003 00:51:42 +0000 (UTC)
Xref: newssvr20.news.prodigy.com comp.databases.oracle.misc:133046

Mark.Powell@eds.com (Mark D Powell) wrote in message news:<2687bb95.0311111126.3f354661@posting.google.com>...
> "Paul Tomlinson" <rubberducky703@hotmail.com> wrote in message news:<bor0k2$1hhjo0$1@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 --
