Re: Portable SQL to compute a date difference in seconds???
- From: Gints Plivna <gints.plivna@xxxxxxxxx>
- Date: 11 May 2007 07:42:12 -0700
johan.de.taeye@xxxxxxxxx wrote:
Hi all,
I am trying to get a portable SQL statement that returns the
difference between 2 dates as a number of seconds.
Is there any possibility to use standard SQL functions to achieve
this?
In PostgreSQL one can use: extract(epoch from (date1 - date2))
In MySQL one can use: datediff(date1,date2) * 86400
In Access one can use: DateDiff("s",date1,date2)
etc...
None of the above pleases me - I'ld like a common expression for all
these databases.
Regards,
Johan
Time to understand that even if these products all are called DBMSes
it doesn't mean all are the same or even similar.
Gints Plivna
http://www.gplivna.eu
.
- References:
- Portable SQL to compute a date difference in seconds???
- From: johan . de . taeye
- Portable SQL to compute a date difference in seconds???
- Prev by Date: Re: Flexible columns
- Next by Date: Re: Portable SQL to compute a date difference in seconds???
- Previous by thread: Portable SQL to compute a date difference in seconds???
- Next by thread: Re: Portable SQL to compute a date difference in seconds???
- Index(es):