Return-Path: X-Original-To: apmail-db-derby-user-archive@www.apache.org Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D5EBD3321 for ; Wed, 4 May 2011 19:01:49 +0000 (UTC) Received: (qmail 28242 invoked by uid 500); 4 May 2011 19:01:49 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 28189 invoked by uid 500); 4 May 2011 19:01:49 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Received: (qmail 28182 invoked by uid 99); 4 May 2011 19:01:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 May 2011 19:01:49 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS,UNPARSEABLE_RELAY X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [148.87.113.121] (HELO rcsinet10.oracle.com) (148.87.113.121) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 May 2011 19:01:42 +0000 Received: from rtcsinet21.oracle.com (rtcsinet21.oracle.com [66.248.204.29]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id p44J1HxO028132 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 4 May 2011 19:01:20 GMT Received: from acsmt357.oracle.com (acsmt357.oracle.com [141.146.40.157]) by rtcsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id p44J1GuJ007305 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 4 May 2011 19:01:17 GMT Received: from abhmt004.oracle.com (abhmt004.oracle.com [141.146.116.13]) by acsmt357.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id p44J1BQG008889 for ; Wed, 4 May 2011 14:01:11 -0500 Received: from localhost (/193.71.104.118) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 04 May 2011 12:01:10 -0700 From: Knut Anders Hatlen To: derby-user@db.apache.org Subject: Re: Date manipulation in Derby References: <4DBFF91B.5080200@oracle.com> Mail-Followup-To: derby-user@db.apache.org Date: Wed, 04 May 2011 21:01:42 +0200 In-Reply-To: (Dag H. Wanvik's message of "Wed, 04 May 2011 19:38:25 +0200") Message-ID: User-Agent: Gnus/5.110016 (No Gnus v0.16) Emacs/24.0.50 (usg-unix-v) MIME-Version: 1.0 Content-Type: text/plain X-Source-IP: rtcsinet21.oracle.com [66.248.204.29] X-CT-RefId: str=0001.0A090209.4DC1A280.00F9:SCFSTAT5015188,ss=1,fgs=0 dag.wanvik@oracle.com (Dag H. Wanvik) writes: > Rick Hillegas 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