Date format examples
This table shows examples of how date and time patterns are interpreted in the U.S. locale. The date and time used for the examples is 2023-07-04 12:08:56 local time in the U.S. Pacific Time time zone.
| Date and time pattern | Result | 
|---|---|
| EEEE, d MMM yyyy HH:mm:ss Z | Wednesday, 4 Jul 2023 12:08:56 -0700 | 
| yyyy-MM-dd | 2023-07-04 | 
| MM/dd/yyyy | 07/04/2023 | 
| EEE, d MMM yyyy HH:mm:ss Z | Wed, 4 Jul 2023 12:08:56 -0700 | 
| yyMMddHHmmssZ | 230704120856-0700 | 
| yyyy.MM.dd G 'at' HH:mm:ss z | 2023.07.04 AD at 12:08:56 PDT | 
| EEE, MMM d, ''yy | Wed, Jul 4,'23 | 
| yyyyy.MMMMM.dd GGG hh:mm aaa | 02023.July.04 AD 12:08 PM | 
| h:mm a | 12:08 PM | 
| K:mm a, z | 0:08 PM, PDT | 
| hh 'o''clock' a, zzzz | 12 o'clock PM, Pacific Daylight Time |