db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Knut Anders Hatlen <knut.hat...@oracle.com>
Subject Re: Date manipulation in Derby
Date Wed, 04 May 2011 19:01:42 GMT
dag.wanvik@oracle.com (Dag H. Wanvik) writes:

> Rick Hillegas <rick.hillegas@oracle.com> writes:
>
>> I don't see an existing JIRA for this issue. Feel free to log one.
>
> Rick, do you know if there is a standard way of doing this (beyond the
> JDBC escape function)? I didn't find anything in the standard. It could
> be that this is one of those things that are not standardized and the
> presence of the JDBC escape is there to cover for vendors differing
> implementations of this. If so, we would be hestitant to add this unless
> most major vendors agreed on this syntax.

Hi Dag,

SQL:2003, part 2, has a section 4.6.4 Operations involving datetimes and
intervals. If my understanding is correct, databases that support
intervals would allow you to write things like:

  VALUES TIMESTAMP('2010-12-31 23:59:59') + INTERVAL '1' DAY

-- 
Knut Anders

Mime
View raw message