jackrabbit-oak-issues mailing list archives

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

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

Mouli  updated OAK-6600:
------------------------
    Attachment:     (was: screenshot-2.png)

>  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
>
> 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
(v6.4.14#64029)

Mime
View raw message