Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Help needed with Date Functions
That's not what I'm after. I'm looking for a simple way to calculate the
difference between two dates in seconds. The two dates may be months apart
and I don't want to do any fancy arithmetic like working out the difference
in days, multiplying by 24*3600 then adding and subtracting the seconds
since midnight ('SSSS') for each of the boundary dates.
Surely there must be a simpler way??
D. Buecherl wrote in message <371B223E.4CD736D7_at_nkk.net>...
>date1 - date2 gives you the number of days between two dates, therefore
>24 * 3600 * (sysdate - trunc(sysdate, 'MONTH'))
>gives you the number of seconds elapsed within the current month
>
>Dieter
>
>Paul Wiles schrieb:
>
>> Hi
>>
>> Can someone tell me how to find the difference in seconds between two
>> dates - is there an equivalent to the Transact SQL function:
>>
>> datediff(ss,date1,date2).
>>
>
Received on Mon Apr 19 1999 - 08:31:06 CDT
![]() |
![]() |