Skip to main content
FormatDescriptionExamples
dThe day of the month, from 1 through 311/12/2014 – 1
29/12/2014 – 29
ddThe day of the month, from 01 through 311/12/2014 – 01
29/12/2014 – 29
MThe month, from 1 through 121/7/2014 – 7
1/12/2014 – 12
MMThe month, from 01 through 121/7/2014 – 07
1/12/2014 – 12
MMMThe abbreviated name of the month1/7/2014 – Jun
1/12/2014 – Dec
MMMMThe full name of the month1/7/2014 – June
1/12/2014 – December
yyThe year, from 00 to 991/12/2014 – 14
yyyyThe year as a four-digit number1/12/2014 – 2014
hThe hour, using a 12-hour clock from 1 to 121:45:30 AM – 1
1:45:30 PM – 1
hhThe hour, using a 12-hour clock from 01 to 121:45:30 AM – 01
1:45:30 PM – 01
HThe hour, using a 24-hour clock from 0 to 231:45:30 AM – 1
1:45:30 PM – 13
HHThe hour, using a 24-hour clock from 00 to 231:45:30 AM – 01
1:45:30 PM – 13
mThe minute, from 0 through 591:08:30 PM – 8
1:45:30 PM – 45
mmThe minute, from 00 through 591:08:30 PM – 08
1:45:30 PM – 45
sThe second, from 0 through 591:45:08 PM – 8
1:45:30 PM – 30
ssThe second, from 00 through 591:45:08 PM – 08
1:45:30 PM – 30