Change the Formatting of Dates
The formatting of dates in an interview, including the input and output formats, can be changed. To do this:
- On the Project tab, select the Language subtab.
- In the Region section of the language view, click Formatting.
The Edit Formats dialog box is displayed. The symbols used when specifying date formats are given in the following table.
Symbols | Meaning |
---|---|
d | day of the month (1-31) |
dd | day of the week, zero padded (01-31) |
M | integer month (1-12) |
MM | integer month, zero padded (01-12) |
MMM | short month string (jan-short to dec-short). The display text for these strings are defined in the Styles dialog on the Interview tab. For more information, see Change the date and time text. |
MMMM(M*) | full month string (jan-full to dec-full). Can have four or more M's. The display text for these strings are defined in the Styles dialog on the Interview tab. For more information, see Change the date and time text. |
yy | two digit year. Dates can be entered with either a two digit year or a four digit year. If it is a two digit year, it will be interpreted as being a year between 1941 and 2040 (for example, 01-01-20 will be interpreted as 1 January 2020). If the year falls between 1941 and 2040, it will display with a two digit year, otherwise it will display with a four digit year. |
yyyy | four digit year. Dates must be entered with a four digit year to be valid. Dates will always be displayed with a four digit year. |
E, EE or EEE | short day of the week name (mon-short to sun-short). The display text for these strings are defined in the Styles dialog on the Interview tab. For more information, see Change the date and time text. |
EEEE(E*) | full day of the week name (mon-full to sun-full). Can have four or more E's. The display text for these strings are defined in the Styles dialog on the Interview tab. For more information, see Change the date and time text. |
All other characters will be treated literally. Any characters, including symbols enclosed in single quotes will also be treated literally. |
For example:
- yyyy-MM-dd – 2014-02-19
- d/M/yy – 19/2/14
- EEE, d MMM yyyy – Fri, 19 Feb 2014
- EEEE, dd MMMM yyyy – Friday, 19 February 2014
To change the input format for dates:
- In the Dates section, click in the Input formats field.
- In the drop-down window:
- Click in the empty row to add a new date format
- Select an existing row and click Delete to remove that date format
- Change the order of input formats using the Up and Down buttons
Note: The first date format specified will be used for: (a) the input of dates collected with calendar controls, and (b) the order of the drop-downs and their options for multi-input date inputs.
To change the output format for dates:
- In the Dates section, click in the Output format field.
- Change the date format as required.
Note: Generally, specifying a particular number of digits in the date format only affects the output not the input. That is, the two digit format will be zero-padded when it is output, regardless of whether a two digit or one digit format is input. For example, if you specify the format dd-MM-yyyy, 1-2-16 would be accepted as an input and then displayed as 01-02-2016.