Illegal Date Format in CSV File Breaks Project Import

Symptoms

The following error is thrown, while importing issues via CSV;

java.lang.IllegalArgumentException: Illegal pattern character 'Y'
at java.text.SimpleDateFormat.compile(SimpleDateFormat.java:675)
at java.text.SimpleDateFormat.initialize(SimpleDateFormat.java:494)
at java.text.SimpleDateFormat.(SimpleDateFormat.java:443)
at java.text.SimpleDateFormat.(SimpleDateFormat.java:424)
at com.atlassian.jira.imports.csv.PropertiesCsvMapper.init(PropertiesCsvMapper.java:50)
at com.atlassian.jira.imports.csv.MindProdCsvProvider.startSession(MindProdCsvProvider.java:48)
at com.atlassian.jira.imports.csv.CsvDataBean.populateCache(CsvDataBean.java:122)

Cause

An invalid date format (like MM/dd/YYYY) is in use. The capital Y is not recognize by the SimpleDateFormat class

Resolution

Change the date format and retry the CSV import:
These time and date formats are used throughout JIRA. To specify them, use the format described at http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html.

When you are not in edit mode, the examples in the rightmost column show you how the various formats will appear.

To set the date picker format, see:

Here are some example configurations for U.S time:

Preferred Date

Configuration in jira-application.properties

Oct/1/10

jira.date.picker.java.format = MMM/d/yy
jira.date.picker.javascript.format = %b/%e/%y

10/05/10

jira.date.picker.java.format = MM/dd/yy
jira.date.picker.javascript.format = %m/%d/%y

Jan 5, 2010

jira.date.picker.java.format = MMM dd, yyyy
jira.date.picker.javascript.format = %b %d, %Y

10/05/2010

jira.date.picker.java.format = MM/dd/yyyy
jira.date.picker.javascript.format = %m/%d/%Y


Last modified on Mar 30, 2016

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.