This documentation is archived and is not being maintained.

Standard DateTime Format Strings Output Examples

The following table illustrates the output created by applying some standard DateTime format strings to a particular date and time. Output was produced using the ToString method.

The Format specifier column indicates the format string, the Culture column indicates the culture associated with the current thread, and the Output column indicates the result of formatting.

The different culture values demonstrate the impact of changing the current culture. The culture can be changed by using the Date/Time control panel in Microsoft Windows, by passing your own DateTimeFormatInfo class as the format provider, or by passing a CultureInfo class set to a different culture. Note that changing the culture does not influence the output produced by the 'r' and 's' formats.

Format specifierCurrent cultureOutput
Den-USTuesday, April 10, 2001
Ten-US3:51:24 PM
fen-USTuesday, April 10, 2001 3:51 PM
ffr-FRmardi 10 avril 2001 15:51
ren-USTue, 10 Apr 2001 15:51:24 GMT
rzh-SGTue, 10 Apr 2001 15:51:24 GMT
uen-US2001-04-10 15:51:24Z
usv-FI2001-04-10 15:51:24Z
men-USApril 10
mms-MY10 April
yen-USApril, 2001
yaf-ZAApril 2001
Len-UZUnrecognized format specifier; a format exception is thrown.

See Also

Formatting Overview | Formatting Types | Standard DateTime Format Strings | Custom DateTime Format Strings