Icon StrToDateTime

Unit: WebCore

Available In: Client and Server Applications

function StrToDateTime(const Value: String; UTC: Boolean=False): DateTime

The StrToDateTime function converts the formatted local or UTC date and time string input parameter into its native value. The required format of the string is determined by the TFormatSettings ShortDateFormat and ShortTimeFormat properties. The return value is a DateTime value.

Examples

A := StrToDateTime('2/13/2012 12:10 PM');
X := DateTimeToStr(A);  // X is '2/13/2012 12:10 PM'
Image