Date time format and advanced filter

John Bayne
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 25, 2015

I wish to change date formats to dd-MM-yyyy which is straight forward.

Can you advise how to make the expected format in the Issue Navigator advanced query match this, please. E.g. project = <project> AND created >= 23-05-2015

Yields error:-

Date value '23-05-2013' for field 'created' is invalid. Valid formats include: 'yyyy/MM/dd HH:mm', 'yyyy-MM-dd HH:mm', 'yyyy/MM/dd', 'yyyy-MM-dd', or a period format e.g. '-5d', '4w 2d'.

 

I suspect that resource could be one of jira.date.time.picker.java.format or jira.date.time.picker.javascript.format ?

 

Thanks

 

 

4 answers

2 votes
Colm Kernan September 10, 2019

both of the following formats are working for me:

project = <project> and createdDate >= 2015-05-23

project = <project> and createdDate >= '2015-05-23 00:00'

2 votes
Udo Brand
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 25, 2015

No, the problem is that created date also has a timestamp part,  so you need to add the timestamp part (HH:mm) to your date in the query

What I recommend is using date functions like startOf Day(), now() or others

see:https://confluence.atlassian.com/display/JIRA062/Advanced+Searching+Functions#AdvancedSearchingFunctions-function

 

0 votes
Udo Brand
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 25, 2015

Ah, now I understand. You need to change following:

jira.date.picker.java.format

jira.date.picker.javascript.format

jira.date.time.picker.java.format

jira.date.time.picker.javascript.format

So you always have the same format within JIRA

See: https://confluence.atlassian.com/display/JIRA/__date+and+time+formats

0 votes
John Bayne
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 25, 2015

It error message says that valid formats include 'yyyy-MM-dd' so I'd hope to switch a resource so that it would match dd-MM-yyyy as I'd like to set in the look and feel date formats.

Suggest an answer

Log in or Sign up to answer