DateTimeToString Method (IFormatProvider) |
Converts the value of the current
DateTime object to its equivalent string representation using the specified culture-specific format information.
Namespace: SystemAssembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax public string ToString(
IFormatProvider provider
)
Parameters
- provider
- Type: SystemIFormatProvider
An object that supplies culture-specific formatting information.
Return Value
Type:
StringA string representation of value of the current
DateTime object as specified by
provider.
Exceptions Exception | Condition |
---|
ArgumentOutOfRangeException | The date and time is outside the range of dates supported by the calendar used by provider. |
See Also