Portable SQL to compute a date difference in seconds???
- From: johan.de.taeye@xxxxxxxxx
- Date: 11 May 2007 00:21:36 -0700
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
.
- Follow-Ups:
- Re: Portable SQL to compute a date difference in seconds???
- From: Gene Wirchenko
- Re: Portable SQL to compute a date difference in seconds???
- From: Gints Plivna
- Re: Portable SQL to compute a date difference in seconds???
- Prev by Date: Oracle's PRO*C to Oracle PL/SQL
- Next by Date: Re: Flexible columns
- Previous by thread: Oracle's PRO*C to Oracle PL/SQL
- Next by thread: Re: Portable SQL to compute a date difference in seconds???
- Index(es):