Portable SQL to compute a date difference in seconds???




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

.