|
At 09:35 07/15/2003, Vern Hamburg wrote:I want to get the duration in seconds between 2 timestamps in SQL. I have looked at the duration from subtracting 2 timestamps. But this does not seem a reliable way to do this, when leap years Feb 29 are involved. Or, actually, when relatively long periods are involved - 2 months can be anything from 59 -62 days.
Vern,
Try "select days(date2) - days(date1)". Should give you the actual number of days between two dates.
Pete Hall
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.