Data type styles

Data type styles affect how various data types are displayed in the form. Different locales may have different styles for displaying information related to dates and time, such as dates, days of month, days of week, and years.

The following table shows how the style affects the presentation of various data types in the en_US locale. For other locales, refer to the locale in the Locale Quick Reference. The symbols used to define each format are explained in Date patterns.

Table 1. data types and their styles as shown in the US-English locale.
Data Type Style Format Example
date numeric yyyyMMdd 20041123
short yyyy-MM-dd 2004-11-23
medium d MMM yyyy 23 Nov 2004
long MMMM d, yyyy November 23, 2004
full EEEE, MMMM d, yyyy Tuesday, November 23, 2004
day_of_month numeric d 3
short d 3
medium d 3
long d 3
full d 3
day_of_week numeric e 3
short e 3
medium EEE Wed
long EEEE Wednesday
full EEEE Wednesday
date_time numeric yyyyMMdd H:mm 20041123 08:15
short yyyy-MM-dd H:mm 2004-11-23 08:15
medium d MMM yyyy h:mm a 23 Nov 2004 8:15 AM
long MMMM d, yyyy h:mm a November 23, 2004 8:15 AM
full EEEE, MMMM d, yyyy h:mm:ss a z Tuesday, November 23, 2004 8:15:23 AM PST
month numeric M 9
short M 9
medium MMM Sep
long MMMM September
full MMMM September
time numeric H.mm 17.30
short H:mm 17:30
medium h:mm a 5:30 PM
long h:mm a 5:30 PM
full h:mm:ss a z 5:30:14 PM PST
year numeric yyyy 2004
short yy 04
medium yyyy 2004
long yyyy 2004
full yyyy G 2004 AD