|
Derby 10.1 supports datetime arithmetic... Adding a constant interval
to a datetime (timestampadd) or subtracting one datetime with another (timestampdiff).
However, these operators are only present as JDBC escape functions, so
you need to invoke them using standard JDBC function invocation syntax.
( {fn func()} Check out the (confusing) syntax in 10.1 reference manual: http://db.apache.org/derby/docs/10.1/ref/refderby.pdf ij> select {fn timestampdiff(SQL_TSI_DAY, {d '2000-01-01'}, {d '2000-01-10'})} as date_diff from oneRow; DATE_DIFF ----------- 9 1 row selected Satheesh Maciej Bliziński wrote: Hello everybody, I have a question about getting a date difference in Derby. I tried Derby online docs, Google (web and newsgroups) and got no results. |
- How to get a difference between two dates? Maciej Bliziński
- Re: How to get a difference between two dates? Satheesh Bandaram
