NAnt SDK Documentation - v0.92 |

# DateTimeConversionFunctions.ToString Method (DateTime, String)

Converts the specified DateTime to its equivalent string representation.

[Visual Basic]
<Function(Name:="format-to-string")>
Overloads Public Shared Function ToString( _
ByVal value As Date, _
ByVal format As String _
) As String
[C#]
[Function(Name="format-to-string")]
public static string ToString(
DateTime value,
string format
);

#### Parameters

value
  A DateTime to convert.
format
  A format string.

#### Return Value

A string representation of value formatted using the specified format

#### Remarks

value is formatted with the DateTimeFormatInfo for the invariant culture.

#### See Also

DateTimeConversionFunctions Class | NAnt.Core.Functions Namespace | DateTimeConversionFunctions.ToString Overload List