Tokens for date and time parsing
Year, month, and day tokens
Input
Example
Description
YYYY20144 or 2 digit year
YY142 digit year
Y-25Year with any number of digits and sign
Q1..4Quarter of year. Sets month to first month in quarter.
M MM1..12Month number
MMM MMMMJan..DecemberMonth name
D DD1..31Day of month
Do1st..31stDay of month with ordinal
DDD DDDD1..365Day of year
X1410715640.579Unix timestamp
x1410715640579Unix ms timestamp
Week year, week, and weekday tokens
Input
Example
Description
ddd ddddMon...SundayDay name
GGGG2014ISO 4 digit week year
GG14ISO 2 digit week year
W WW1..53ISO week of year
E1..7ISO day of week
Hour, minute, second, millisecond, and offset tokens
Input
Example
Description
H HH0..23Hours (24 hour time)
h hh1..12Hours (12 hour time used with a A.)
k kk1..24Hours (24 hour time from 1 to 24)
a Aam pmPost or ante meridiem (Note the one character a p are also considered valid)
m mm0..59Minutes
s ss0..59Seconds
S SS SSS0..999Fractional seconds
Z ZZ+12:00Offset from UTC as +-HH:mm, +-HHmm, or Z
recommendation-more-help
7e1891ad-4d59-4355-88ab-a2e62ed7d1a3