From derby-user-return-6920-apmail-db-derby-user-archive=db.apache.org@db.apache.org Tue Jun 05 07:52:18 2007 Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 74591 invoked from network); 5 Jun 2007 07:52:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Jun 2007 07:52:18 -0000 Received: (qmail 97210 invoked by uid 500); 5 Jun 2007 07:52:21 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 97180 invoked by uid 500); 5 Jun 2007 07:52:20 -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 97169 invoked by uid 99); 5 Jun 2007 07:52:20 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Jun 2007 00:52:20 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS,UPPERCASE_25_50 X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of dmitri.pissarenko@gmail.com designates 64.233.166.178 as permitted sender) Received: from [64.233.166.178] (HELO py-out-1112.google.com) (64.233.166.178) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Jun 2007 00:52:15 -0700 Received: by py-out-1112.google.com with SMTP id f31so2856690pyh for ; Tue, 05 Jun 2007 00:51:54 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=S2Wc4IRvOceMaPcsXZn9RVO8iwIVK6RGwXuQcg+5Hm5v0w96CKma41XQ3WzgTMhPLyw7vpncG1L52JhEhKtAnsupC6FkMw6Pm+vI6l0d4hwkETDbB3Si2HuTY+hPsVhDLfFlKAHCyN3WPhtCj/64pVLCiDrSudJDgqnOHD/v7CU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=c6RKRWwygW7nlg9gEfeBRME4KG2huTJvN7bul+VttfXo7O6ye31jm+Wnwe9HGVlRAyrnJoKh45lStiSFmHH/jHpw/Erk8DzgJTmYCbWb/QEdhhyA4kSO0OtKABxYs7+7mIEMuUPUMeSZsTsOcjUOnzyJ0Eu3NA42JwoGMITIcEg= Received: by 10.35.66.1 with SMTP id t1mr9823032pyk.1181029914544; Tue, 05 Jun 2007 00:51:54 -0700 (PDT) Received: by 10.35.36.2 with HTTP; Tue, 5 Jun 2007 00:51:54 -0700 (PDT) Message-ID: Date: Tue, 5 Jun 2007 09:51:54 +0200 From: "Dmitri Pissarenko" To: "Derby Discussion" Subject: Re: Difference between two timestamp fields In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <46647024.8020409@sbcglobal.net> X-Virus-Checked: Checked by ClamAV on apache.org Hello! I found the error. This query is correct (SQL_TSI_SECOND instead of SQL_TSI_FRAC_SECOND): > > > SELECT APP.MyTable.startTime, {fn TIMESTAMPDIFF(SQL_TSI_SECOND, > > > APP.MyTable.startTime, APP.MyTable.endTime)} > > > FROM APP.MyTable > > > WHERE APP.MyTable.startTime IS NOT NULL Thanks again. Dmitri Pissarenko -- http://www.xing.com/profile/Dmitri_Pissarenko http://dapissarenko.blogspot.com/