| Format Code | Value |
| <%%> | a single percent character |
| <%a> | abbreviated weekday name (for example Wed) |
| <%A> | full weekday name (for example Wednesday) |
| <%b> | abbreviated month name (for example Jun) |
| <%B> | full month name (for example June) |
| <%c> | locale's default date and time representation |
| <%d> | day of month (01–31) |
| <%H> | hour (24-hour clock) (00–23) |
| <%I> | hour (12-hour clock) (01–12) |
| <%j> | day number of year (001–366) |
| <%m> | month number (01–12) |
| <%M> | minute (00–59) |
| <%p> | AM or PM flag |
| <%S> | seconds (00–59) |
| <%<digit>u> | fractional seconds with <digit> precision |
| <%U> | week number of the year (00–53), with the first Sunday as the first day of week one; 00 represents the first week |
| <%w> | weekday as a decimal number (0–6), with 0 representing Sunday |
| <%W> | week number of the year (00–53), with the first Monday as the first day of week one; 00 represents the first week |
| <%x> | locale's date representation |
| <%X> | locale's time representation |
| <%y> | year within century (00–99) |
| <%Y> | year, including the century (for example, 1997) |
| <%Z> | time zone name or abbreviation, depending on the operating system locale settings |