.NET Date Format Converter (Standard Specifiers)
.NET's `DateTime.ToString(format)` uses standard specifiers: "O" round-trip (`2026-08-13T14:30:00.0000000Z`), "s" sortable (`2026-08-13T14:30:00`), "u" universal sortable (`2026-08-13 14:30:00Z`), plus the culture-dependent short date "d", short time "t", full "f" and general "g" formats.
This converter renders your date-time with each specifier so you can predict `ToString("O")` output and choose the right specifier for serialization, logs and UI.
.NET Date Format Converter (Standard Specifiers) Quick Reference
| Format | Pattern / Description | Example 1 | Example 2 |
|---|---|---|---|
| .NET Round-trip ("O") | ISO 8601 with 7-digit ms | 2026-08-13T14:30:00.0000000Z | 2026-01-01T00:00:00.0000000Z |
| .NET Sortable (s) | ISO8601 Local | 2026-08-13T14:30:00 | 2026-01-01T00:00:00 |
| .NET Short Time (t) | Short Time | 2:30 1786602600 | 12:00 1767196800 |
| .NET Short Date (d) | MM/dd/yyyy | 08/13/2026 | 01/01/2026 |
| .NET Full Short (f) | Date + Short Time | 0013, August 13, 2026 2:30 1786602600 | 0001, January 01, 2026 12:00 1767196800 |
| .NET General Short (g) | Short Date+Time | 08/13/2026 2:30 1786602600 | 01/01/2026 12:00 1767196800 |
| .NET Universal Sortable (u) | UTC Sortable | 2026-08-13 14:30:00Z | 2026-01-01 00:00:00Z |
* Examples are rendered in UTC for the fixed sample instants above.
When to Use .NET Date Format (Standard Specifiers)
JSON serialization parity
System.Text.Json serializes DateTime as ISO 8601; verify "O" output matches what your API consumers expect.
Log format consistency
Standardize on "s" or "u" for structured logs and verify the exact string shape for parsers.
UI display formatting
Preview "d" (short date), "t" (short time) and "g" outputs to choose culture-appropriate display formats.
Frequently Asked Questions
What does the .NET "O" format output?
The round-trip ISO 8601 form: `2026-08-13T14:30:00.0000000Z` for UTC `DateTime`, preserving all 7 fractional digits and the offset.
What is the difference between "s" and "u" in .NET?
"s" (sortable) = `yyyy-MM-ddTHH:mm:ss` with no zone; "u" (universal sortable) = `yyyy-MM-dd HH:mm:ssZ` (space separator, Z suffix). Both sort lexicographically.
Is "O" the same as ISO 8601?
Yes for practical purposes — "O" follows ISO 8601 round-trip with up to 7 fractional digits. It is the safest specifier for machine interchange.
Why is my DateTime serialized with a "K"?
The "K" specifier in a custom format writes the zone designator (`Z` for UTC, `+02:00` for offsets). It is often combined as `yyyy-MM-ddTHH:mm:ss.fffK`.
Related Time Format Converters
All Format Guides
Need to Convert Between All Formats?
Use the main Time Format Converter for instant conversion across 100+ formats — epoch, ISO 8601, RFC 3339, SQL datetime, military time and more in one click.
Open Time Format Converter