Formatting Tokens

TokenExampleDescriptionsAvailability (Parse /Format)
YYYY2024full yearboth
YY242 digits yearboth
MMMMJunemonth nameboth
MMMJunmonth short nameboth
MM03, 09, 10, 11, ...2 digits month numberboth
M3, 9, 10, 11, ...month numberboth
DDDD092 digits day of yearformat
DDD9day of yearformat
DD03, 09, 10, 17, ...2 digits day of monthboth
D3, 9, 10, 17, ...day of monthboth
WW01, 03, 24, 33, ...2 digits week of yearformat
W1, 3, 24, 33, ...week of yearformat
ddddSunday, Monday, Tuesday, ...week day nameformat
dddSun, Mon, Tue, ...week day short nameformat
dd01, 02, ..., 072 digits week day numberformat
d1, 2, ..., 7week day numberformat
HH03, 09, 13, 17, ...2 digits hour (24 hour mode)both
H3, 9, 13, 17, ...hour (24 hour mode)both
hh03, 09, 10, 12, ...2 digits hour (12 hour mode)both
h3, 9, 10, 12, ...hour (12 hour mode)both
mm03, 09, 10, 17, ...2 digits minuteboth
m3, 9, 10, 17, ...minuteboth
ss03, 09, 10, 17, ...2 digits secondboth
s3, 9, 10, 17, ...secondboth
SSS1003 digits millisecondboth
SS102 digits millisecondboth
S11 digit millisecondboth
AAMmeridiemboth
aammeridiem lowercaseboth