LocalDateTime type supports the following patterns:
The following standard patterns are supported:
O: The round-trip pattern, which is always "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffff" using the invariant culture. The calendar
system is not round-tripped in this pattern, but it's compatible with the BCL round-trip pattern.
r: The full round-trip pattern including calendar system, which is always "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffff '('c')'" using the invariant culture.
s: The sortable pattern, which is always "yyyy'-'MM'-'dd'T'HH':'mm':'ss" using the invariant culture.
F: The full date and time pattern as defined by the culture's
For example, in the invariant culture this is "dddd, dd MMMM yyyy HH:mm:ss".
The custom format patterns for local date and time values are provided by combining the custom patterns for
the custom patterns for
LocalTime. The result is simply the combination of the date and the time.
There is one exception to this: when parsing a
LocalDateTime, an 24-hour (
HH) specifier is allowed to have the value 24,
instead of being limited to the range 00-23. This is only permitted if the resulting time of day is midnight, and it indicates
the end of the specified day. The result is midnight on the following day. For example, using the ISO pattern, the values
2012-11-25T00:00:00 are equivalent. A value of 24 is never produced when formatting.