XPath 2.0 has a current-dateTime() function, but don't know if it's available in Jackrabbit's implementation.
Phil :n) On Thu, 2008-11-06 at 10:59 +0000, sbarriba wrote: > Hi all, > > We want to be able to query a set of nodes that have a date property which > is earlier than the current date. > > > > Is there a function facility within JCR SQL or XPath which will be replaced > with the current time/date? > > > > I can do it by creating a literal date in Java to achieve. > > xpathquery "/jcr:root/home/entries//element(*, > acm:BlogEntry)[EMAIL PROTECTED]:publishdate < > xs:dateTime(\'2008-11-05T00:00:00.000+01:00\')]" > > > > .but I'd rather simply do.. > > xpathquery "/jcr:root/home/acmenodes//element(*, > acm:BlogEntry)[EMAIL PROTECTED]:publishdate < sysdate()]" > > > > All help appreciated. > > Regards, > > Shaun > > > > >
