Starting with version 3.1, OpenClinica uses the ISO 8601 standard date format as its canonical representation for dates and partial dates. An OpenClinica DATE is a string with year, month, day separated by a “-“which is the ISO8601 standard date format and all dates are stored internally in this format.
The OpenClinica user interface supports localization of dates, with the default date format in the user interface being DD-MMM-YYYY, but others (such as MM/DD/YYYY or DD/MM/YYYY) may be used depending on the localization/translation packages installed on a given OpenClinica instance. All dates are translated by the application to the canonical format specified here prior to insert/update into the database.
In versions 3.0.x and earlier, the OpenClinica canonical date format for internal storage of CRF item data values is MM/DD/YYYY, while for other fields (such as date of birth or enrollment date) it was ISO 8601. This approach limited the consistency of dates and partial dates and is not a universally recognized format. In 3.1 the canonical ISO 8601 date format was established for internal storage of all dates, including CRF item data values for dates and partial dates.
This document helps readers understand the impact of changing the default date format in OpenClinica, as well as explains the transformation of existing date values in the item_data table that will occur when upgrading to OpenClinica version 3.1.
For CRF items, OpenClinica 3.0.x and prior stored dates and partial dates in either the U.S. date format, or as Strings dependent on the user’s localization settings. Because of this date values (especially partial dates) were sometimes ambiguous. It is possible for OpenClinica instances upgraded from 3.0.x and older versions that some CRF items of type ‘DATE’ may have existing values that do not match the allowed string pattern, in this case they will not be converted to ISO 8601 upon upgrade. Further sections of this chapter specify the changes being made to the default date format stored in the item_data table of the OpenClinica database and also describe in detail the migration/transformation of existing date values in the item_data table that occur when upgrading from OpenClinica 3.0.x to version 3.1.
For a more formal specification of data typing for user-defined CRF Item Data values in OpenClinica version 3.1 (Amethyst), see OpenClinica Item Data Specifications.