You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Mouli (JIRA)" <ji...@apache.org> on 2017/08/31 07:55:00 UTC

[jira] [Issue Comment Deleted] (OAK-6600) queries on Date type results empty search results

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

Mouli  updated OAK-6600:
------------------------
    Comment: was deleted

(was: [~chetanm] any thoughts on how to do that?)

>  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)