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?

  • jahia sql help
    2011/10/27 09:58

    asd <p> Hi, I want to select all news from</p> <ul> <li> yesterday</li> <li> specific date (<span style="color:#0000cd;">igonre time</span>)</li> </ul> <p> SELECT * FROM [jnt:news] as news<br /> WHERE ISDESCENDANTNODE(news, [/sites/myFirstSite]) OR ISDESCENDANTNODE(news, [/sites/mySecondSite])<br /> AND&nbsp; news.[date] = &#39;<span style="color:#b22222;">???</span>&#39;</p> <p> &nbsp;</p> <p> Can someone help me with syntax of the date?</p>

  • Number of messages  8
    Registration date Oct 27, 2011
    0 (0 Good)
    0 (0 Bad)

    Re: jahia sql help

    by  asd »  2011/10/31 09:33

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

  • Re: jahia sql help
    2011/10/31 09:33

    asd <p> <font color="#3f5fbf" size="2"><font color="#3f5fbf" size="2">&#39;2011-10-15T00:00:00.000Z&#39;</font></font></p>

  • Number of messages  8
    Registration date Oct 31, 2011
    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