ToString Method (String)
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Converts the value of the current DateTime object to its equivalent string representation using the specified format.
Assembly: mscorlib (in mscorlib.dll)
The format parameter should contain either a single format specifier character (see Standard Date and Time Format Strings) or a custom format pattern (see Custom Date and Time Format Strings) that defines the format of the returned string. If format is nullNothingnullptrunita null reference (Nothing in Visual Basic) or an empty string, the general format specifier, 'G', is used.
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see dd66cd4c-b087-415f-9c3e-94e3a1835f74.