Click or drag to resize
DateTimeParse Method (String)
Converts the specified string representation of a date and time to its DateTime equivalent.

Namespace: System
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
public static DateTime Parse(
	string s
)

Parameters

s
Type: SystemString
A string containing a date and time to convert.

Return Value

Type: DateTime
An object that is equivalent to the date and time contained in s.
Exceptions
ExceptionCondition
ArgumentNullExceptions is null.
FormatExceptions does not contain a valid string representation of a date and time.
See Also