Is there analog og the MySQL’s time_to_sec() ?
I heed to perform query like the following on H2 database:
select * from order
join timmingSettings on order.timmingSettings = timmingSettings.id
where (order.time-timmingSettings.timeout) < current_timestamp
No, but it seems quite easy to add function to h2 if needed.
To convert a timestamp to seconds since epoch, compile and add a Java class to h2’s classpath containing:
The function in the Java code can then be linked in h2 using CREATE ALIAS:
Produces: