[Note: This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.] 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. For more information, see Standard DateTime Format Strings.
The different culture values used in the table demonstrate the impact of changing the current culture. The culture can be changed when the user makes regional and language settings in Control Panel. Alternatively, it is changed when your application passes its own DateTimeFormatInfo or CultureInfo object as the format provider.
Note that changing the culture does not influence the output produced by the "r" and "s" format strings.
Short Date Pattern
Format string | Current culture | Output |
|---|
d | en-US | 4/10/2001 |
d | en-NZ | 10/04/2001 |
d | de-DE | 10.04.2001 |
Long Date Pattern
Format string | Current culture | Output |
|---|
D | en-US | Tuesday, April 10, 2001 |
Long Time Pattern
Format string | Current culture | Output |
|---|
T | en-US | 3:51:24 PM |
T | es-ES | 15:51:24 |
Full Date/Time Pattern (Short Time)
Format string | Current culture | Output |
|---|
f | en-US | Tuesday, April 10, 2001 3:51 PM |
f | fr-FR | mardi 10 avril 2001 15:51 |
RFC1123 Pattern
Format string | Current culture | Output |
|---|
r | en-US | Tue, 10 Apr 2001 15:51:24 GMT |
r | zh-SG | Tue, 10 Apr 2001 15:51:24 GMT |
Sortable Date/Time Pattern (ISO 8601)
Format string | Current culture | Output |
|---|
s | en-US | 2001-04-10T15:51:24 |
s | pt-BR | 2001-04-10T15:51:24 |
Universal Sortable Date/Time Pattern
Format string | Current culture | Output |
|---|
u | en-US | 2001-04-10 15:51:24Z |
u | sv-FI | 2001-04-10 15:51:24Z |
Month Day Pattern
Format string | Current culture | Output |
|---|
m | en-US | April 10 |
m | ms-MY | 10 April |
Year Month Pattern
Format string | Current culture | Output |
|---|
y | en-US | April, 2001 |
y | af-ZA | April 2001 |
An Invalid Pattern
Format string | Current culture | Output |
|---|
L | en-UZ | Unrecognized format pattern; a format exception is thrown. |

See Also