Jahia in English > jahia sql help

0 (0 Good)
0 (0 Bad)

jahia sql help

by  asd »  2011/10/27 09:58

Hi, I want to select all news from

  • yesterday
  • specific date (igonre time)

SELECT * FROM [jnt:news] as news
WHERE ISDESCENDANTNODE(news, [/sites/myFirstSite]) OR ISDESCENDANTNODE(news, [/sites/mySecondSite])
AND  news.[date] = '???'

 

Can someone help me with syntax of the date?

  (asd)

Number of messages  8
Registration date
0 (0 Good)
0 (0 Bad)

Re: jahia sql help

by  asd »  2011/10/31 09:33

'2011-10-15T00:00:00.000Z'

  (asd)

Number of messages  8
Registration date
0 (0 Good)
0 (0 Bad)

Re: Re: jahia sql help

by  shuber »  2011/10/31 09:39

'2011-10-15T00:00:00.000Z'


Hello, 

You can find information about JCR queries here : http://www.day.com/specs/jcr/2.0/index.html

For the date format part, it is located in this section:

http://www.day.com/specs/jcr/2.0/3_Repository_Model.html#3.6.4.3%20From%20DATE%20To

Best regards,

  Serge Huber.

Serge Huber (shuber)

Number of messages  271
Registration date
Contact
Share
Feedback

Get in touch

Whether you are a current user or if you are just evaluating Jahia, we are here to help.

Contact us

Share this page