Date format symbols

This table shows contains the symbols that you can use to write date formats.

Symbol Description Output Example
G era designator text AD
y year number 2020
M month in year text and number July & 07
d day in month number 10
h hour in am/pm (1-12) number 12
H hour in day (0-23) number 0
m minute in hour number 30
s second in minute number 55
S milisecond number 978
E day in week text Tuesday
D day in year number 189
F day of week in month number 2 (2nd Wednesday in July)
w week in year number 27
W week in month number 2
a am/pm market text PM
k hour in day (1-24) number 24
K hour in am/pm (0-11) number 0
z time zone text Pacific Standard
' escape for text delimiter n/a
" single quote literal '
mili miliseconds since 01/01/1970. You cannot use this symbol with any other symbol. literal mili
micro microseconds since 01/01/1970. You cannot use this symbol with any other symbol. literal micro