jackrabbit-oak-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chetan Mehrotra (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (OAK-6600) queries on Date type results empty search results
Date Fri, 01 Sep 2017 05:09:01 GMT

     [ https://issues.apache.org/jira/browse/OAK-6600?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Chetan Mehrotra resolved OAK-6600.
    Resolution: Invalid

Please use the mailing list for questions. See the participate section here: http://jackrabbit.apache.org/oak/

>  queries on Date type results empty search results
> --------------------------------------------------
>                 Key: OAK-6600
>                 URL: https://issues.apache.org/jira/browse/OAK-6600
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.6.0
>            Reporter: Mouli 
>            Priority: Blocker
>              Labels: jcr, oak
>         Attachments: screenshot-1.png, screenshot-2.png
> 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

This message was sent by Atlassian JIRA

View raw message