Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 9569 invoked from network); 8 Aug 2007 14:02:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Aug 2007 14:02:12 -0000 Received: (qmail 47064 invoked by uid 500); 8 Aug 2007 14:02:09 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 47038 invoked by uid 500); 8 Aug 2007 14:02:08 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 47027 invoked by uid 99); 8 Aug 2007 14:02:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Aug 2007 07:02:08 -0700 X-ASF-Spam-Status: No, hits=1.5 required=10.0 tests=HELO_DYNAMIC_DHCP,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [195.130.132.35] (HELO nocme2bl3.telenet-ops.be) (195.130.132.35) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Aug 2007 14:02:02 +0000 Received: from nocme1bl6.telenet-ops.be (nocme1bl6.telenet-ops.be [195.130.136.37]) by nocme2bl3.telenet-ops.be (Postfix) with ESMTP id 56AB3334004 for ; Wed, 8 Aug 2007 16:01:41 +0200 (CEST) Received: from nocme1bl6.telenet-ops.be (localhost.localdomain [127.0.0.1]) by nocme1bl6.telenet-ops.be (Postfix) with ESMTP id 3D5EF388051 for ; Wed, 8 Aug 2007 16:01:41 +0200 (CEST) From: "davy" To: user-java@ibatis.apache.org Importance: Normal Sensitivity: Normal Message-ID: X-Originating-IP: [193.191.216.52] X-Forwarded-For: [(null)] Date: Wed, 08 Aug 2007 14:01:41 +0000 Subject: Small problem with date. MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org I have the next problem, I have a query which must filters a certain period out a number. for example: this is the number 54789635479E200708081545 this means 2007 year 08 month 08 day 15 hour 45 minutes. Now, i have a query (substr(number,13,8) between ? and ? This means that the user can give a certain from date and until date (year,month,day) sow the query will search on this date in these number I have developed this : Example.setOrderByClause("substr(number,13,8)"); Example.createCriteria().andnumberBetween(fDate, uDate); fDate and uDate = are both strings, these are the 2 dates that the user has given to search for. for example fDate = 20050101 from uDate = 20063112 until When i use the query, al my numbers are displayd, butt the query have not worked properly. Is there someone that has a proposal how it must be done.