This seems to be complicated since nobody has answered so far. So I dug a bit deeper:

select * from nt:base where date >= '2007-11-04T23:59:59'
-> finds everything

tried this: http://www.mail-archive.com/[EMAIL PROTECTED]/ msg01519.html
select * from nt:base where date >= TIMESTAMP '2007-11-04T23:59:59'
-> finds nothing, throws exception

select * from nt:base where date >= TIMESTAMP '2007-11-01T00:00:00.000 +01:00'
-> WORKS!

So the time zone info seems to be crucial!

Regards,
Will

On 05.11.2007, at 18:30, Will Scheidegger wrote:

List

Could someone please give me a pointer on how to search on dates in JCR SQL queries? The documentation in the JSR170 specification is a bit slim... On page 101 I found the operators that are accepted and under 6.2.5.1 it tells you how to format a date. But when I try this:

SELECT * FROM nt:base WHERE date >= '2007-11-04T23:59:59' order by date

I get way to many records. And this:

SELECT * FROM nt:base WHERE date >= 2007-11-04T23:59:59 order by date

leads to an exception. So any help is warmly appreciated!
Thanks!

-Will

----------------------------------------------------------------
for list details see
http://documentation.magnolia.info/docs/en/editor/stayupdated.html
----------------------------------------------------------------


----------------------------------------------------------------
for list details see
http://documentation.magnolia.info/docs/en/editor/stayupdated.html
----------------------------------------------------------------

Reply via email to