Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-6600

queries on Date type results empty search results

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Invalid
    • 1.6.0
    • None
    • core
    • Important

    Description

      there are two issues here
      1) by default when we try to store date in jcr it saves in below format 2017-08-21 21:35:33 when i perform query on this date it is showing empty search results.
      select [body/dataNum] from [cas:article] where [jcr:lastModified] = '2017-08-29 16:36:39' order by [jcr:created] DESC
      2) when i try to use
      select [body/dataNum] from [cas:article] where [jcr:lastModified] cast('2017-08-29 16:36:39' as date) order by [jcr:created] DESC it is throwing an error not a date string, after some investigation i found that it will accept only ISO8601 format (yyyy-MM-dd'T'HH:mm:ss.SSSZ). when i try to store date in above format it automatically converts to yyyy.MM.dd HH:mm:ss .
      now my questions are
      1) how to change default date format of jcr to yyyy-MM-dd'T'HH:mm:ss.SSSZ
      2) how to perform queries on Dates

      Attachments

        Activity

          People

            Unassigned Unassigned
            mouli Mouli
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: