Hi Zarife,

If you want to do a query on a date you have to do like this in XPATH, I never use SQL on trees:

//[EMAIL PROTECTED]<=xs:dateTime('theDate')]

But the format of the date has to be like this:
2006-11-09T13:53:14.254+01:00

as you did in this example:
select * from mgnl:metaData WHERE modificationDate <
xs:dateTime('2008-12-07T12:20:46.275+01:00')

but as I don't know how to use sql on trees I don't if the parameters before 
the WHERE condition are correct.

Regards,

CAPITAINE Harold


Oktay, Zarife (CH) a écrit :
Hi,

I have a problem with JCR queries on date fields.

I try to make a query on modificationDate and creationDate. I tried the
following queries but neither of them are working :
select * from mgnl:metaData WHERE modificationDate < '2008-12-07'

select * from mgnl:metaData WHERE modificationDate < '2008-12-07
12:20:46'

select * from mgnl:metaData WHERE modificationDate <
xs:dateTime('2008-12-07T12:20:46.275+01:00')

select * from mgnl:metaData WHERE modificationDate <
dateTime('2008-12-07T12:20:46.275+01:00')

Does anyone know the right format to make queries on date fields ? Thanks.

Zarife Cal-Oktay

************************************************************************************
This email and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed.
If you have received this email in error, please notify the system manager 
([EMAIL PROTECTED]) and delete the message with any attached files from your 
system.
The confidentiality and integrity of this message cannot be guaranteed on the 
Internet and the sender does not accept liability for its content.

***********************************************************************************


----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/developer.html
----------------------------------------------------------------





----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/developer.html
----------------------------------------------------------------

Reply via email to