Date and Time Formats


Each ExtraView user has the capability to set their date and time format. The date and time formats determine how dates and times are displayed in output text or html and how they are parsed when entered by the user. The user can select their date and time format on the Personal Options screen. Either one of the in-built formats can be selected, or the user can set the Date Format to the value of Custom Date Mask and then provide their own mask in the field labeled Date Mask.

Localizable Date and Time Formats

Dates and times are represented differently around the world. An ExtraView user may choose one of the date/time formats that are sensitive to the specific locale they are using. The following date and time formats will be represented differently dependent on the user’s current locale setting. The following table shows the date format names used in ExtraView, with an example of how this appears in English/US locale representation:

Format Name Description Example
SHORT Short without time 12/30/02
MEDIUMDATE Medium without time Dec 30, 2002
LONGDATE Long without time December 30, 2002
FULLDATE Full without time Monday December 30, 2002
SHORTDATETIME Short with time 12/30/02 1:15 PM
MEDIUMDATETIME Medium with time Dec 30, 2002 1:15 PM
LONGDATETIME Long with time December 30, 2002 1:15 PM
FULLDATETIME Full with time Monday December 30, 2002 1:15 PM

Standard Date/Time Parsing Formats

Certain date and time formats are built in to ExtraView as patterns to be used for parsing dates. If a date is entered in one of the standard formats, it will be parsed without any errors. Use of a custom date mask extends the possible date/time entry formats to include the custom mask pattern.

The following are the standardized date/time parsing formats:

Format Example
MM/dd/yy 04/21/03
dd/MM/yy 21/04/03
MM/dd/yyyy 04/21/2003
dd/MM/yyyy 21/04/2003
dd-MMM-yy 21-April-03
dd-MMM-yyyy 21-April-2003
yyyy/MM/dd HH:mm:ss z 2003/04/21 10:23:34 PST
yyyy/MM/dd HH:mm:ss 2003/04/21 10:23:34
yyyy/MM/dd 2003/04/21
yyyy-MM-dd HH:mm:ss 2003-04-21 10:23:34
yyyy MM dd HH:mm:ss 2003 04 21 10:23:34
MM-dd-yyyy HH:mm 04-21-2003 10:23
yyyy-MM-dd 2003-04-21
MM/dd/yy HH:mm 04/21/03 10:23
MM/dd/yy HH 04/21/03 10
yy-MM-dd 03-04-21
MMM dd yyyy April 21 2003
MMM dd, yyyy April 21, 2003
MMM. dd yyyy Apr. 21 2003
MMM. dd, yyyy Apr. 21, 2003

Custom Date Masks

A custom date mask provides the ExtraView user with the maximum of flexibility, but the representation of dates and times using a custom date mask are formatted similarly regardless of the user’s current locale setting. Text strings such as month names or days of week within the representation are locale-sensitive.

Entry of date values into forms can use one of the ExtraView standard date formats or whatever format the user has defined using a custom date mask.

Custom date masks consist of a sequence of characters consisting of punctuation or pattern letters that are chosen from the following:

Letter Date or Time Component Usage Examples
G Era designator G AD
y Year yyyy, yy 1996; 96
Y Week Year (context sensitive) YYYY, YY 2015; 15
M Month in year (standalone MMMM, MMM, MM July; Jul; 07
L Month in year LLLL, LLL, LL July; Jul; 07
w Week in year ww 29
W Week in month W 3
D Day in year DDD 219
d Day in month dd 10
F Day of week in month F 3
E Day in week EEEE, EE Tuesday; Tue
a Am/pm marker a PM
H Hour in day (0 - 23) HH 24
k Hour in day (1-24) kk 24
K Hour in am/pm (0 - 11) KK 10
h Hour in am/pm (1-12) hh 12
m Minute in hour mm 30
s Second in minute ss 55
S Millisecond SSS 834
z Time zone (general) Z Pacific Standard Time; PST; GMT-08:00
Z Time zone (RFC 822) Z -0800
X Time zone (ISO 8601) X -08:00

Pattern letters are usually repeated, as their number determines the exact presentation:

  • Text: For formatting, if the number of pattern letters is 4 or more, the full form is used; otherwise a short or abbreviated form is used if available. For parsing, both forms are accepted, independent of the number of pattern letters.
  • Number: For formatting, the number of pattern letters is the minimum number of digits, and shorter numbers are zero-padded to this amount. For parsing, the number of pattern letters is ignored unless it's needed to separate two adjacent fields.
  • Year: For formatting, if the number of pattern letters is 2, the year is truncated to 2 digits; otherwise it is interpreted as a number. For parsing, if the number of pattern letters is more than 2, the year is interpreted literally, regardless of the number of digits. So using the pattern "MM/dd/yyyy", "01/11/12" parses to “Jan 11, 12 A.D”. For parsing with the abbreviated year pattern ("y" or "yy"), ExtraView must interpret the abbreviated year relative to some century. In ExtraView, the year on a date parsed from user input is always checked to see if it is greater than 1000. If not, the year is adjusted to a more “rational” value by adding either 1900 or 2000 to the specified year. 2000 is added if the result would be less than or equal to the current year, otherwise, 1900 is added. For example, using a pattern of "MM/dd/yy" and a date presented on Jan 1, 1997, the string "01/11/03" would be interpreted as Jan 11, 2003 while the string "05/04/64" would be interpreted as May 4, 1964.
  • Month: If the number of pattern letters is 3 or more, the month is interpreted as text; otherwise, it is interpreted as a number.
  • General time zone: Time zones are interpreted as text if they have names. For time zones representing a GMT offset value, the following syntax is used: GMTOffsetTimeZone: GMT Sign Hours : Minutes Sign: one of - Hours: Digit Digit Digit Minutes: Digit Digit Digit: one of 0 1 2 3 4 5 6 7 8 9.  Hours must be between 0 and 23, and Minutes must be between 0 and 59. The format is locale independent and digits must be taken from the Basic Latin block of the Unicode standard. For parsing, RFC 822 time zones are also accepted.
  • RFC 822 time zone: For formatting, the RFC 822 4-digit time zone format is used: RFC822TimeZone: Sign TwoDigitHours Minutes TwoDigitHours: Digit Digit TwoDigitHours must be between 00 and 23. Other definitions are as for general time zones. For parsing, general time zones are also accepted.