NAnt SDK Documentation - v0.92 |

# DateTimeConversionFunctions.Parse Method

Converts the specified string representation of a date and time to its DateTime equivalent.

[Visual Basic]
<Function(Name:="parse")>
Public Shared Function Parse( _
ByVal s As String _
) As Date
[C#]
[Function(Name="parse")]
public static DateTime Parse(
string s
);

#### Parameters

s
  A string containing a date and time to convert.

#### Return Value

A DateTime equivalent to the date and time contained in s.

#### Remarks

The DateTimeFormatInfo for the invariant culture is used to supply formatting information about s.

#### Exceptions

Exception Type | Condition
--- | ---
FormatException | s does not contain a valid string representation of a date and time.

#### See Also

DateTimeConversionFunctions Class | NAnt.Core.Functions Namespace