CLDR / ICU pattern to C# custom format.
20 of 26 fields map cleanly; 6 have no C# custom format token.
C# custom format
yyyy-MM-dd HH:mm
Reference · Mon, Jan 2 2006, 3:04:05 PM MST
0606-01-02 15:04
0606-01-02 15:04
Right now, your zone
…
Both sides render the same instant — the translation is faithful.
| CLDR / ICU pattern | C# custom format | Field | Example |
|---|---|---|---|
| y | yyyy | Four-digit year | 2006 |
| yy | yy | Two-digit year | 06 |
| M | M | Month number | 1 |
| MM | MM | Month number, padded | 01 |
| MMM | MMM | Month name, abbreviated | Jan |
| MMMM | MMMM | Month name, full | January |
| d | d | Day of month | 2 |
| dd | dd | Day of month, padded | 02 |
| E | ddd | Weekday, abbreviated | Mon |
| EEEE | dddd | Weekday, full | Monday |
| D | no token | Day of year | 2 |
| w | no token | Week of year | 1 |
| Y | no token | ISO week-based year | 2006 |
| H | H | Hour, 24-hour clock | 15 |
| HH | HH | Hour, 24-hour clock, padded | 15 |
| h | h | Hour, 12-hour clock | 3 |
| hh | hh | Hour, 12-hour clock, padded | 03 |
| a | tt | AM/PM marker | PM |
| mm | mm | Minute, padded | 04 |
| ss | ss | Second, padded | 05 |
| S | fff | Fractional seconds | 000 |
| xx | no token | UTC offset, basic | -0700 |
| xxx | zzz | UTC offset, extended | -07:00 |
| z | no token | Time-zone name, short | MST |
| G | g | Era | AD |
| Q | no token | Quarter | 1 |