'Timestamp Format Must Be yyyy-mm-dd' while Importing from an External System

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Symptoms

A JIRA application import fails, throwing a java.lang.IllegalArgumentException. The following appears in the atlassian-jira.log:

1 2 3 4 5 6 7 2012-12-14 09:55:43,055 JiraImportTaskExecutionThread-1 ERROR anonymous 594x16x1 - 0:0:0:0:0:0:0:1%0 /secure/SetupImport.jspa [jira.action.admin.OfbizImportHandler] Failed to set attribute 'CustomFieldValue.datevalue' with value '19740-06-05 00:00:00.0'. Error: Timestamp format must be yyyy-mm-dd hh:mm:ss[.fffffffff] 2012-12-14 09:55:43,056 JiraImportTaskExecutionThread-1 ERROR anonymous 594x16x1 - 0:0:0:0:0:0:0:1%0 /secure/SetupImport.jspa [jira.bc.dataimport.DefaultDataImportService] Error importing data: java.lang.IllegalArgumentException: Timestamp format must be yyyy-mm-dd hh:mm:ss[.fffffffff] java.lang.IllegalArgumentException: Timestamp format must be yyyy-mm-dd hh:mm:ss[.fffffffff] at java.sql.Timestamp.valueOf(Timestamp.java:194) at org.ofbiz.core.entity.GenericEntity.setString(GenericEntity.java:317) at com.atlassian.jira.action.admin.OfbizImportHandler.startElement(OfbizImportHandler.java:210) at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)

Cause

There can be two causes for this error.

  1. The timestamp does not correspond to the application configured date and time format. In the example above - yyyy-mm-dd - the lower case of m defined is representing the minute in an hour.

  2. If above doesn't help, there could be an invalid date (for example 19740-06-05 00:00:00.0) in the backup XML file that could be causing this error. When this date is not compatible with the targeted JIRA application instance, the system throws this error.

Workaround

  1. Configure the destination of the JIRA application to match the date and time format from the original system's format. See Date/Time Formats.

  2. If there is an invalid date in the xml file, then there would be an indication about it in the atlassian-jira.log file. Try to look throught the logs and then fix the invalid date.

Resolution

Based on two causes of this error, there are two resolutions for the error.

  1. Track JRASERVER-23171 - Timestamp Format Must Be yyyy-mm-dd error when importing for a resolution on the bug.

  2. Fix the invalid date in the XML file and then try to import the file again into the JIRA application. In the above example, that date is 19740-06-05 00:00:00.0. This can be corrected by modifying the date in the XML backup to be something valid, such as 1970-06-05 00:00:00.0.

ℹ️ An easy way of finding the line numbers to modify in Linux would be to use egrep, for example:

1 egrep -n "[0-9]{5}\-[0-9]{2}\-[0-9]{2}" entities.xml
Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.