.NET DateTime Format String Tester
Type a .NET format string, pick a culture, and see exactly what DateTimeOffset.ToString returns. Powered by real .NET with full ICU culture data.
Click a specifier to insert it. Hover for what it means, or see the reference below.
—
Custom format specifiers
The building blocks you combine into a format string. Examples shown for Wed, 04 Nov 2026, 13:05:09.123 (en-US, +00:00).
| Specifier | Meaning | Example |
|---|---|---|
| yyyy | Year, 4 digits | 2026 |
| yy | Year, last 2 digits | 26 |
| MMMM | Month name, full | November |
| MMM | Month name, abbreviated | Nov |
| MM | Month number, 2 digits | 11 |
| dddd | Weekday name, full | Wednesday |
| ddd | Weekday name, abbreviated | Wed |
| dd | Day of month, 2 digits | 04 |
| HH | Hour, 24-hour clock, 2 digits | 13 |
| hh | Hour, 12-hour clock, 2 digits | 01 |
| mm | Minute, 2 digits | 05 |
| ss | Second, 2 digits | 09 |
| fff | Fractional second, 3 digits (ms) | 123 |
| tt | AM / PM designator | PM |
| zzz | UTC offset, hours and minutes | +00:00 |
| K | Time-zone offset (Z or ±hh:mm) | +00:00 |
| 'text' | Literal text, kept verbatim | text |
| - | Literal character | - |
| / | Date separator (culture-specific) | / |
| : | Time separator (culture-specific) | : |
| ␣ | Literal space | (space) |
Standard format specifiers
Single-letter shortcuts for common patterns, shown live with your current date, culture, and offset.
| Specifier | Result |
|---|
DateTime format questions
How do I format a DateTime in C# with a custom format string?
Call ToString with a format string and a culture, for example date.ToString("dddd, dd MMMM yyyy HH:mm", CultureInfo.GetCultureInfo("de-DE")). Type your format above to see the exact output.
What is the difference between MM and mm?
MM is the month as two digits, while mm is minutes. HH is the 24-hour clock and hh is the 12-hour clock. Format specifiers in .NET are case-sensitive.
Why does the output change with the culture?
Month and day names, separators, and standard patterns like d and D come from the culture's DateTimeFormatInfo. Switching from en-US to de-DE changes "Wednesday" to "Mittwoch".
How do I include literal text in a format string?
Wrap it in single quotes or escape characters with a backslash, for example yyyy-MM-dd 'at' HH:mm.
Is the output the same as running .NET on my machine?
It is real .NET 10 with full ICU data, so it matches .NET on macOS and Linux. On Windows with NLS globalization, a few cultures can differ slightly.