...
Letter | Date or time component | Shown as | Example |
---|---|---|---|
G | Era designator | Text | AD |
C | Century of era | Number | 20 |
Y | Year of era | Year | 1996 |
w | Week in year | Number | 27 |
e | Day in week | Number | 2 |
E, EE, or EEE - EEEE | Day of the week | Text | Tue - Tuesday |
y | Year | Year | 1996; 96 |
D | Day in year | Number | 189 |
MM - MMM; MMMM | Month of year | Month | 01 - Jan; January |
d | Day in month | Number | 10 |
a | Am/pm marker | Text | PM |
K | Hour in am/pm (0-11) | Number | 0 |
h | Hour in am/pm (1-12) | Number | 12 |
H | Hour in day (0-23) | Number | 0 |
k | Hour in day (1-24) | Number | 24 |
m | Minute in hour | Number | 30 |
s | Second in minute | Number | 55 |
S | Millisecond | Number | 978 |
x | weekWeek's year | Number | 14 |
Examples
From string to date
...