System Namespace DateTime Structure
Converts the value of this instance to its equivalent string.
[ VB ]
<Serializable>
Overrides Overloads Public Function ToString ( ) As String
[ C# ]
[ Serializable ]
public override string ToString ( );
[ C++ ]
[ Serializable ]
public: String* ToString ( );
[ JScript ]
public Serializable
override function ToString ( ) : String;
A string representation of value of this instance.
The value of this instance is formatted using the general format specifier, 'G', as described in the Formatting Overview topic. The return value is identical to the value returned by ToString ( "G", null ).
This method uses formatting information derived from the current culture. For more information, see CurrentCulture.
The below shows the default DateTime.ToString ( ) output for each of the available cultures.
Show me
DateTime Members DateTime.ToString Overload List DateTimeFormatInfo CultureInfo