-
Notifications
You must be signed in to change notification settings - Fork 39
Date Format
TechieGuy12 edited this page Feb 7, 2022
·
1 revision
The date and time formats are used to specify how a date will be formatted within a folder/file structure. The format follows the custom date and time format strings used in C#.
A quick summary of some of the values are as follows:
| Specifier | Description | Example |
|---|---|---|
| yy | Two-digit year from 00 - 99. | 2022-02-05 -> 22 |
| yyyy | Four-digit year. | 2022-02-05 -> 2022 |
| M | The month number with no leading zero. | 2022-02-05 -> 2 |
| MM | Two-digit month number with a leading zero. | 2022-02-05 -> 02 |
| MMM | Abbreviated name of the month. | 2022-02-05 -> Feb |
| MMMM | Full name of the month. | 2022-02-05 -> February |
| d | Day of the month with no leading zero. | 2022-02-05 -> 5 |
| dd | Day of the month with a leading zero. | 2022-02-05 -> 05 |
| ddd | Abbreviated name of the day. | 2022-02-05 -> Sat |
| dddd | Full name of the day. | 2022-02-05 -> Saturday |
| Specifier | Description | Example |
|---|---|---|
| h | The hour using a 12-hour clock with no leading zero. | 1:09:08 AM -> 1 1:09:08 PM -> 1 |
| hh | The hour using a 12-hour clock with a leading zero. | 1:09:08 AM -> 01 1:09:08 PM -> 01 |
| H | The hour using a 24-hour clock with no leading zero. | 1:09:08 AM -> 1 1:09:08 PM -> 13 |
| HH | The hour using a 24-hour clock with a leading zero. | 1:09:08 AM -> 01 1:09:08 PM -> 13 |
| m | The minute with no leading zero. | 1:09:08 AM -> 9 |
| mm | The minute with a leading zero. | 1:09:08 AM -> 09 |
| s | The second with no leading zero. | 1:09:08 AM -> 8 |
| ss | The second with a leading zero. | 1:09:08 AM -> 08 |
The above tables show only some common specifier. There are additional specifiers you can use outlined on the custom date and time format page from Microsoft.