Formats for dates and times

Microsoft Graph

Formats for dates and times

Days, months, and years To display days, months, and years, include the following format codes in a section. If you use "m" immediately after the "h" or "hh" format code or immediately before the "ss" or "s" code, Microsoft Graph displays minutes instead of the month.

To display Use this format code
Months as 1–12 m
Months as 01–12 mm
Months as Jan–Dec mmm
Months as January–December mmmm
Months as the first letter of the month mmmmm
Days as 1–31 d
Days as 01–31 dd
Days as Sun–Sat ddd
Days as Sunday–Saturday dddd
Years as 00–99 yy
Years as 1900–9999 yyyy

Hours, minutes, and seconds To display hours, minutes, and seconds, include the following format codes in a section.

To display Use this format code
Hours as 0–23 h
Hours as 00–23 hh
Minutes as 0–59 m
Minutes as 00–59 mm
Seconds as 0–59 s
Seconds as 00–59 ss
Hours as 4 AM h AM/PM
Time as 4:36 pm h:mm am/pm
Time as 4:36:03 p h:mm:ss a/p
Elapsed time in hours; for example, 25:02 [h]:mm
Elapsed time in minutes; for example, 63:46 [m]:ss
Elapsed time in seconds [ss]
Fractions of a second h:mm:ss.00

Note  If the format contains an AM or PM, the hour is based on the 12-hour clock, where "AM," "am," "A," or "a" indicates times after midnight to 12:00 noon, and "PM," "pm," "P," or "p" indicates times after noon to 12:00 midnight. Otherwise, the hour is based on the 24-hour clock. The "m" or "mm" must appear immediately after the "h" or "hh" format code or immediately before the "ss" code, or Graph displays the month instead of the minutes.