DateTime::GetDateTimeFormats Method (Char)
Updated: January 2010
Converts the value of this instance to all the string representations supported by the specified standard date and time format specifier.
Assembly: mscorlib (in mscorlib.dll)
Parameters
- format
- Type: System::Char
A standard date and time format string (see Remarks).
Return Value
Type: array<System::String>A string array where each element is the representation of the value of this instance formatted with the format standard date and time format specifier.
| Exception | Condition |
|---|---|
| FormatException | format is not a valid standard date and time format specifier character. |
The format parameter can be any of the standard date and time format specifiers. These include "d", "D", "f", "F", "g", "G", "M" (or "m"), "O" (or "o"), "R" (or "r"), "s", "t", "T", "u", "U", and "Y" (or "y"). For more information, see Standard Date and Time Format Strings.
Each element of the return value is formatted using information from the current culture. For more information about culture-specific formatting information for the current culture, see CultureInfo::CurrentCulture.
Note: |
|---|
Because this method uses culture-sensitive data, your application should not assume that multiple calls to the method will return identical data. The data returned by this method can change if the current culture changes, the user overrides individual cultural settings, or an update occurs to the system's cultural data. |
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98, Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC, Xbox 360, Zune
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Note: