Alphabet | Corresponding Date/Time component | Example |
---|---|---|
G | Era designator | AD |
y | Year | 1996, 96 |
M | Month in year | July, Jul, 07 |
w | Week in year | 27 |
W | Week in month | 2 |
D | Day in year | 189 |
d | Day in month | 10 |
F | Day of week in month | 2 |
E | Day in week | Tuesday; Tue |
a | am/pm marker | pm |
H | Hour in a day (0-23) | 0 |
k | Hour in a day (1-24) | 24 |
K | Hour in am/pm (1-11) | 0 |
h | Hour in am/pm (0-12) | 12 |
m | Minutes in hour | 30 |
s | Seconds in minute | 55 |
S | Millisecond | 978 |
z | Time zone (General time zone) | Pacific Standard Time; PST; GMT-08:00 |
Z | Time zone (RFC 822 time zone) | -0800 |
The characters that are not supported in Windows OS are \ / : * ? " < > |. The characters that are not supported in Unix OS are ¬ ! " £ $ % ^ & * ( ) + = { [ } ] : ; @ ~ # ? < > , | \ ` ' and any spaces. |