Passa al contenuto principale

8. Appendix 2 – List of Date & Time Formats

Format SpecifierDescriptionExamples
dThe day of the month, from 1 to 31.2009-06-01T13:45:30 → 1, 2009-06-15T13:45:30 → 15
ddThe day of the month, from 01 to 31.2009-06-01T13:45:30 → 01
dddThe abbreviated name of the day of the week.2009-06-15T13:45:30 → Mon
ddddThe full name of the day of the week.2009-06-15T13:45:30 → Monday
FSecond precision.2009-06-15T13:45:30.6170000 → 6
FFFThe milliseconds in a date and time value.6/15/2009 13:45:30.617 → 617
FFFFFFFThe ten millionths of a second in a date and time value.2009-06-15T13:45:30.6175425 → 6175425
hThe hour, using a 12-hour clock from 1 to 12.
hhThe hour, using a 12-hour clock from 01 to 12.
HThe hour, using a 24-hour clock from 0 to 23.
HHThe hour, using a 24-hour clock from 00 to 23.
o<G>Time zone information.2009-06-15T01:45:30-07:00-07:00
mThe minute, from 0 to 59.
mmThe minute, from 00 to 59.
MThe month, from 1 to 12.
MMThe month, from 01 to 12.
MMMThe abbreviated name of the month.2009-06-15T13:45:30 → Jun
MMMMThe full name of the month.2009-06-15T13:45:30 → June
sThe second, from 0 to 59.2009-06-15T13:45:09 → 9
ssThe second, from 00 to 59.2009-06-15T13:45:09 → 09
ttThe AM/PM designator.2009-06-15T13:45:30 → PM
yyThe year, from 00 to 99.0001-01-01T00:00:00 → 01, 2019-06-15T13:45:30 → 19
yyyyThe year as a four-digit number.2009-06-15T13:45:30 → 2009
zIANA Timezone Id2024 Sep 09 08:02:16.1 Europe/LondonEurope/London
:The time separator
/The date separator