[xwiki-users] date query (date property equals specified date)
Hi! I'm having trouble with date queries... I have a class with a date property and I want to filter all its documents which have this date property equal to a defined value. How can do that? -- Atenciosamente, Erica Usui.
Hm, I have to do the following: #set($hql = ",BaseObject as obj, DateProperty as data where doc.fullName= obj.name and obj.className='XWiki.ExClass' and obj.name<>'XWiki.ExTemplate' and data.id.id=obj.id and data.name='Data' and data.value=20101028") The value of the property is has the format of the defined format of my wiki, and concatenate all the numbers. :) 2010/10/29 Erica Usui <[email protected]>
Hi!
I'm having trouble with date queries... I have a class with a date property and I want to filter all its documents which have this date property equal to a defined value.
How can do that?
-- Atenciosamente, Erica Usui. to
-- Atenciosamente, Erica Usui.
Hi, Erica Usui wrote:
Hi!
I'm having trouble with date queries... I have a class with a date property and I want to filter all its documents which have this date property equal to a defined value.
How can do that?
I think you must take a look at, at least, these documents: http://platform.xwiki.org/xwiki/bin/view/DevGuide/velocityHqlExamples http://platform.xwiki.org/xwiki/bin/view/DevGuide/QueryGuide http://platform.xwiki.org/xwiki/bin/view/DevGuide/Scripting#HVelocitySpecifi... Check Comparison Date Tool in this last entry. HTH! Ricardo -- Ricardo RodrÃguez CTO eBioTIC. Life Sciences, Data Modeling and Information Management Systems
participants (2)
-
[Ricardo Rodriguez] eBioTIC. -
Erica Usui