Method ToDateTime
ToDateTime()
Converts the value represented by this instance to a date and time
value.
Declaration
public override DateTime ToDateTime()
Returns
| Type | Description |
|---|---|
| DateTime | A date and time equivalent to the string represented by this instance. |
Overrides
Remarks
This method performs the same conversion as
ToDateTime(String).
Exceptions
| Type | Condition |
|---|---|
| FormatException | The string represented by this instance is not a valid date and time string. |