Using four digit dates allows you to avoid the difficulties associated with using only two digits to represent a year.
Should software or hardware handle dates by storing the year in two digits (for example, 99 for 1999), it assumes that the two missing digits are 19. It will display January 6, 1900 and January 6, 2000 the same way (06/01/00) and will interpret both as January 6, 1900.
While the Viewer uses a sliding scale to determine whether two digit dates should be read as 19xx or 20xx, the same is not necessarily true for other applications and third-party technology. To ensure form dates are read correctly, use four digit dates.
The easiest way to ensure that your forms always use four digit dates is to set the format
option of items that collect date information. The following code sample shows an item with a format
option with a datatype
and a presentation style
. This format automatically renders Jan. 31, '03 as 31st January 2003
In fields, lists, popups, combo boxes (and sometimes labels) that display a year, always use formats that require and display the year in four digits.
- Always set a data type of date or year.
- Do not create a field without a data type.
- For year fields, set a format type of abbreviated, numeric or long, or create a customized formatting template that stores the year as four digits.
- Do not use short format for dates, and do not create a customized formatting template that converts the year to two digits.
- For date fields, set a format type of abbreviated, numeric or long, or a customized formatting type that stores the year as four digits.
- Never create customized formatting templates that stores the year as two digits.
Always ask your users to enter the year in four digits. Create a label above data entry fields that prompts users to type the date correctly. In the help associated with the field, include instructions to use a four digit year.
Always send dates to your database in four digit format.
Exceptions to this practice
There are no exceptions to this practice.