ICultureInfo.ParseDate

Syntax

ParseDate(Value: String): DateTime;

Parameters

Value. Value converted into date type.

Description

The ParseDate method converts the specified value into date according to regional standard settings.

Comments

If the conversion is not possible, the exception is thrown.

Example

Sub UserProc;
Var
    CI: ICultureInfo;
    d: DateTime;
Begin
    CI := CultureInfo.CurrentUi;
    d := CI.ParseDate("14 June 2005");
End Sub UserProc;

On executing the example the conversion from the specified string into date is made according to visual interface culture settings of the current application. If conversion is successful, the "d" variable will contain the date 14.06.2005.

See also:

ICultureInfo