.NET Format Strings - cheat sheets
NET Standard DateTime Format Strings Specifier Name Description d Short date pattern Represents a custom DateTime Format string defined by the current ShortDatePattern property. D Long date pattern Represents a custom DateTime Format string defined by the current LongDatePattern property. f Full date/time pattern Represents a combination of the long date (D) and short time (t) patterns, separated by a space. (short time). F Full date/time pattern Represents a custom DateTime Format string defined by the current FullDateTimePattern property. (long time). g General date/time Represents a combination of the short date (d) and short time (t) patterns, separated by a space. pattern (short time). G General date/time Represents a combination of the short date (d) and long time (T) patterns, separated by a space. pattern (long time). M or m Month day pattern Represents a custom DateTime Format string defined by the current MonthDayPattern property. o Round-trip date/time Represents a custom DateTime Format string using a pattern that preserves time zone information.
.NET Custom DateTime Format Strings Specifier Description d Represents the day of the month as a number from 1 through 31. A single-digit day is formatted without a leading zero. dd Represents the day of the month as a number from 01 through 31. A single-digit day is formatted with a leading zero.
Download .NET Format Strings - cheat sheets
Information
Domain:
Source:
Link to this page:
Please notify us if you found a problem with this document: