The Format Date/Time String function calculates the date and time and formats the output string according to the following format codes.
| Format Code | Value | 
|---|---|
| <%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-specific default date and time | 
| <%d> | day of month (01–31) | 
| <%H> | hour (24-hour clock) (00–23) | 
| <%I> | hour (12-hour clock) (01–12) | 
| <%j> | day number of the year (001–366) | 
| <%m> | month number (01–12) | 
| <%M> | minute (00–59) | 
| <%p> | AM or PM flag | 
| <%S> | second (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-specific date | 
| <%.1x> | long date format | 
| <%.2x> | abbreviated long date format | 
| <%X> | locale-specific time | 
| <%y> | year within century (00–99); when you scan the numbers, numbers (00–68) represent years in the twenty-first century (2000–2068) and numbers (69–99) represent years in the twentieth century (1969–1999) | 
| <%Y> | year, including the century (for example, 1997) | 
| <%z> | difference between locale time and universal time (HH:MM:SS) | 
| <%Z> | time zone name or abbreviation, depending on the operating system locale settings |