Home » SQL & PL/SQL » SQL & PL/SQL » Difference between 2 dates in seconds
Difference between 2 dates in seconds [message #1789] Wed, 29 May 2002 23:29 Go to next message
Gus
Messages: 18
Registered: December 2000
Junior Member
Hi

how would subtract 2 dates from each other and
diplay the results in the amount of seconds?

thanks
Re: Difference between 2 dates in seconds [message #1790 is a reply to message #1789] Thu, 30 May 2002 02:16 Go to previous messageGo to next message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
Subtract date_2 from date_1 and multiply the result by 86400.

Explanation: When you subtract one date from another, you'll get the difference in uunits of days. So you'll have to multiply by 24 (for the conversion of days in hours) and by 3600 (for the conversion of hours in seconds). 3600 * 24 = 86400.

MHE
Re: Difference between 2 dates in seconds [message #1792 is a reply to message #1790] Thu, 30 May 2002 05:05 Go to previous message
Gus
Messages: 18
Registered: December 2000
Junior Member
Thanks
Previous Topic: gui application
Next Topic: Concepts on pro*c
Goto Forum:
  


Current Time: Fri Apr 26 01:15:53 CDT 2024