NAnt SDK Documentation - v0.92 |

# ConversionFunctions.ToDateTime Method

NOTE: This method is now obsolete.

Use type-specific conversion functions instead.

Converts the argument to a datetime.

[Visual Basic]
<Obsolete(Message:="Use type-specific conversion functions instead.", IsError:=False), _ Function(Name:="to-datetime")>
Public Shared Function ToDateTime( _
ByVal value As Date _
) As Date
[C#]
[Obsolete(Message="Use type-specific conversion functions instead.", IsError=False)]
[Function(Name="to-datetime")]
public static DateTime ToDateTime(
DateTime value
);

#### Parameters

value
  value to be converted

#### Return Value

value converted to datetime. The function fails with an exception when the conversion is not possible.

#### See Also

ConversionFunctions Class | NAnt.Core.Functions Namespace