You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by Raphaël Franchet <ra...@anyware-tech.com> on 2005/09/19 16:32:25 UTC

comparing dates in an XPATH search

Hello,

In my repository, I got a "lastModified" property as a Date.

Whith =, this is ok:
createQuery("//*[@myns:lastModified = '2005-08-01T17:42:46.177+02:00']"...

But with other comparator, that is not the case:
createQuery("//*[@myns:lastModified >= 
'2005-08-01T17:42:46.177+02:00']"... returns all the nodes! (whatever 
the date is)

Any idea on how to do it ?

Thanks,

-- 

Raphaël FRANCHET
Systèmes d'information
ANYWARE TECHNOLOGIES
Tel: +33 (0)5 61 00 73 47
Fax : +33 (0)5 61 00 51 46
www.anyware-tech.com

Re: comparing dates in an XPATH search

Posted by Raphaël Franchet <ra...@anyware-tech.com>.
Thank you Jakub!

It works as expected now ! (with xs:dateTime)

Raphaël

Jakub Pawlowicz a écrit :
> Hi Raphael!
> 
> I had the same problem as you.
> Here you can find the appropriate Jackrabbit archives thread: http:// 
> mail-archives.apache.org/mod_mbox/incubator-jackrabbit-dev/ 
> 200508.mbox/%3cF4E598B5-6917-4750-9275-7B82F9ED67B9@jakubpawlowicz.com %3e
> 
> Hopes this helps.
> Regards
> Jakub
> 
> On Sep 19, 2005, at 4:32 PM, Raphaël Franchet wrote:
> 
>> Hello,
>>
>> In my repository, I got a "lastModified" property as a Date.
>>
>> Whith =, this is ok:
>> createQuery("//*[@myns:lastModified = '2005-08-01T17:42:46.177 
>> +02:00']"...
>>
>> But with other comparator, that is not the case:
>> createQuery("//*[@myns:lastModified >= '2005-08-01T17:42:46.177 
>> +02:00']"... returns all the nodes! (whatever the date is)
>>
>> Any idea on how to do it ?
>>
>> Thanks,
>>
>> -- 
>>
>> Raphaël FRANCHET
>> Systèmes d'information
>> ANYWARE TECHNOLOGIES
>> Tel: +33 (0)5 61 00 73 47
>> Fax : +33 (0)5 61 00 51 46
>> www.anyware-tech.com
>>
>>
> 

Re: comparing dates in an XPATH search

Posted by Jakub Pawlowicz <co...@jakubpawlowicz.com>.
Hi Raphael!

I had the same problem as you.
Here you can find the appropriate Jackrabbit archives thread: http:// 
mail-archives.apache.org/mod_mbox/incubator-jackrabbit-dev/ 
200508.mbox/%3cF4E598B5-6917-4750-9275-7B82F9ED67B9@jakubpawlowicz.com 
%3e

Hopes this helps.
Regards
Jakub

On Sep 19, 2005, at 4:32 PM, Raphaël Franchet wrote:

> Hello,
>
> In my repository, I got a "lastModified" property as a Date.
>
> Whith =, this is ok:
> createQuery("//*[@myns:lastModified = '2005-08-01T17:42:46.177 
> +02:00']"...
>
> But with other comparator, that is not the case:
> createQuery("//*[@myns:lastModified >= '2005-08-01T17:42:46.177 
> +02:00']"... returns all the nodes! (whatever the date is)
>
> Any idea on how to do it ?
>
> Thanks,
>
> -- 
>
> Raphaël FRANCHET
> Systèmes d'information
> ANYWARE TECHNOLOGIES
> Tel: +33 (0)5 61 00 73 47
> Fax : +33 (0)5 61 00 51 46
> www.anyware-tech.com
>
>