Formatting the Date type changes the year in the data [January]

Dim Pap shared this problem 6 years ago
Resolved

Hello,

we just faced a weird issue in our reports that use a Date Field.

The data look like the picture:

acf65c863ac5460228ad499be40c00cc


The problem exists with January, 01-01-2017.

When we change the data format to 'Other' and custom date format to 'MMM-YYYY'

this happens:

fbff7e28d8805563965d47656473c64b


'01-01-2017' is translated to 'Jan 2016'.


We actually had the reports in PRODUCTION, we did an update to 7.3 recently and the users reported that. In ACC, the problem didn't occur so it's kind of hard to replicate it I guess.

In order to solve it, I changed the Custom data format to 'MMM-yyyy' (small letters vs. capitals) and the result was correct:

e4c81572e1075f697daa8a8d768a5f83


Do you maybe know what causd the issue and how cna I prevent that from happening again?


Regards,

Dim

Replies (2)

photo
1

Hello,


This is a date format issue - please continue to use "yyyy" over "YYYY"


There is a useful blog post here that explains the difference:

http://www.juandebravo.com/2015/04/10/java-yyyy-date-format


Best regards,

Pete

photo
1

Ok, thank you for your quick answer! :)

Leave a Comment
 
Attach a file