Examples of date/time patterns

A formatted value can be displayed or processed. A raw value conforms to Designer defaults.

Predefined patterns

The following table shows the predefined date and time patterns that you can specify by using the Patterns option in the Field tab of the Object palette and the results of formatting some examples of input default values according to the locale specified. In these examples, the locale is English (USA).

Predefined pattern

Input value (using the short format, which is M/D/YY for date and h:MM A for time)

Formatted value

YYYY-MM-DD

8/23/08

2008-08-23

EEEE, MMMM D, YYYY

8/23/08

Saturday, August 23, 2008

HH:MM:SS

5:02 PM

17:02:00

date{YYYY-MM-DD} time{HH:MM:SS}

8/23/08 5:02 PM

2008-08-23 17:02:00

Note: To find the default short format for date and time, select View > XML Source and search for the following lines:
<datePatterns> 
      <datePattern name="full">EEEE, MMMM D, YYYY</datePattern> 
      <datePattern name="long">MMMM D, YYYY</datePattern> 
      <datePattern name="med">MMM D, YYYY</datePattern> 
      <datePattern name="short">M/D/YY</datePattern> 
</datePatterns> 
<timePatterns> 
      <timePattern name="full">h:MM:SS A Z</timePattern> 
      <timePattern name="long">h:MM:SS A Z</timePattern> 
      <timePattern name="med">h:MM:SS A</timePattern> 
      <timePattern name="short">h:MM A</timePattern> 
</timePatterns>

Custom patterns

The following table shows some custom display patterns that you can define for formatting input default values according to the locale specified. In these examples, the locale is English (USA).

Custom pattern

Input value (using the short format, which is M/D/YY for date and h:MM A for time)

Formatted value

MMMM DD, YYYY

8/23/08

August 23, 2008

EEEE, 'the' D 'of' MMMM, YYYY

8/23/08

Saturday, the 23 of August, 2008

HH:MM

5:02 PM

17:02

h:MM:SS 'o''clock' A Z

5:02 PM

5:02:00 o'clock PM EDT

HH:MM:SS Z

5:02 PM

17:02:00 EDT

// Ethnio survey code removed