Click or drag to resize
DateTimeToString Method
Converts the value of the current DateTime object to its equivalent string representation.

Namespace: System
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
public override string ToString()

Return Value

Type: String
A string representation of the value of the current DateTime object.
Exceptions
ExceptionCondition
ArgumentOutOfRangeExceptionThe date and time is outside the range of dates supported by the calendar used by the current culture.
See Also