jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Klimetschek <aklim...@day.com>
Subject Re: Dates in search
Date Wed, 17 Mar 2010 13:55:34 GMT
On Wed, Mar 17, 2010 at 13:34, JOSE FELIX HERNANDEZ BARRIO
<jose.hernandez@isthari.com> wrote:
> I'm trying to search between two dates:
> select * from temp where( date>='2010-02-01' and date<='2010-02-11')
> but the result is wrong

You need to use sql's TIMESTAMP:

select * from temp where( date >= TIMESTAMP '2010-02-01T00:00:00.000Z'
and date >= TIMESTAMP '2010-02-11T00:00:00.000Z')

(Note: the string literal must be a full ISO 8601 string, including
milliseconds and timezone offset part.)

Regards,
Alex

-- 
Alexander Klimetschek
alexander.klimetschek@day.com

Mime
View raw message