Date and Time Patterns
On this page
A pattern sets how a date or time is written. For example, the pattern d MMMM writes 4 November
, and HH:mm writes 14:30
.
The Date, Time, Offset, and Date Range dialogs all use patterns.
Choose a pattern
Each dialog has four tabs, and a Preview at the top shows the result:
- Default uses the default pattern from Settings. If you change the default later, every Placeholder that uses it changes too.
- Local and Common list ready-made patterns. Tap one to use it.
- Custom lets you write your own. See Write a custom pattern.
Set the default patterns
- Open the Settings tab.
- Tap Date and time.
- Tap Default date format or Default time format.
- Choose a pattern.
Until you choose, the defaults follow your phone's language and region.
Write a custom pattern
On the Custom tab, tap Custom pattern, then tap the parts you want, such as Day, Month, or Hour (24-hour). You can also type the pattern.
| Letters | Writes |
|---|---|
d, dd | Day of month: 5, 05 |
EEE, EEEE | Day of week: Sat, Saturday |
M, MM, MMM, MMMM | Month: 1, 01, Jan, January |
yy, yyyy | Year: 20, 2020 |
H, HH | Hour, 24-hour: 7, 07 |
h, hh | Hour, 12-hour: 7, 07 |
m, mm | Minute: 5, 05 |
s, ss | Second: 8, 08 |
a | AM or PM |
Spaces and punctuation appear as typed. Put words in single quotes, so their letters aren't read as pattern letters: 'Week' w writes Week 45
.
If Typing Hero shows Invalid pattern, the pattern has an unknown letter, writes nothing, such as a single quote mark, or writes more than 100 characters.