Re: date difference

From: Arnold Schommer <aschommer_at_fs-edv.de>
Date: Tue, 30 Mar 1999 16:16:33 +0200
Message-ID: <3700DCC1.46A0039_at_fs-edv.de>


The "only" result oracle gives you is the number of days between two date's. You can achieve it by simply subtracting the dates. But it includes fractions for hours and so on so you can e.g. get the difference of two dates d1 and d2 in minutes (excluding full hours) like this:

   MOD(TRUNC((d2 - d1) * 1440)), 60)

Alex Rivlin wrote:
>
> How can i find difference in hours ( seconds, milliseconds, etc )
> between two date fields ?
> The only function I saw is d\months_between, but it seems I need to code
> for 30,31,28,29 day month, leap years etc.
> Thank you in advance.
> Alex

Arnold Schommer Received on Tue Mar 30 1999 - 16:16:33 CEST

Original text of this message