According to the doc, DATEADD() takes an int for the number of
minutes/seconds/milliseconds/etc to be added to a timestamp:
http://h2database.com/html/functions.html?highlight=DATEADD&search=dateadd#dateadd
This blows up quite quickly when using milliseconds, of course. Here a case
where I'm subtracting 30 days:
select *
from (select timestamp '2001-01-10 12:15:30.0' ts)
where dateadd('ms', -2592000000, ts) <= current_timestamp()
Now, obviously, I could use a different time unit, but I still think that
it would be sensible to accept longs if milliseconds are accepted.
The issue was also reported on Stack Overflow by a jOOQ user:
http://stackoverflow.com/q/29072651/521799
Cheers,
Lukas
--
You received this message because you are subscribed to the Google Groups "H2
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.