On 6 Nov 2014 at 10:16:00, Katsushiro
(martinbeseda@seznam.cz(mailto:martinbeseda@seznam.cz)) wrote:
Hello!
Is there any way to compare two dates formatted differently in one XWQL
query? Here is my query:
/FROM doc.object('$xcontext.macro.params.parentSpaceClass') AS page WHERE
:validDate >= $currDate ORDER BY $ordCol
$xcontext.macro.params.orderDirection/
validDate - variable, which contains date formatted like this (page
content): /01/10/2014 14:47:08/
$currDate - variable, which contains date formatted like this (from XWili
$xwiki.getDate()): /Thu Nov 06 11:09:40 EET 2014/
If there is some way I can do this, please, answer me, I'll be incredibly
thankful for it. If there isn't, I'll filter gained data with Velocity.
Yes please see the examples
at
http://extensions.xwiki.org/xwiki/bin/view/Extension/Query+Module
Fo ex:
$services.query.xwql("where doc.creationDate >
:date").bindValue('date', $datetool.toDate('yyyy-MM-dd',
'2008-01-01')).execute()
Thanks
-Vincent
Thank you for all your answers, Katsu