Skip to content

Flow documentation · legacy product

StringToDateTime ​

Declaration ​

Function StringtoDateTime( const DateTimeFormat : string; const DateTimeStr : string) : TDateTime

Example ​

pascal
procedure OnMapEvent(var Value:Variant);
var MyStrDate : string
begin
MyStrDate := '23/02/2006';
Value := StringToDateTime('dd/mm/yyyy',MyStrDate);
//Value will be equal to a TDateTime of 23 Feb 2006
end;

Description ​

StringToDateTime will return a TDateTime value built from the DateTimeStr value. DateTimeFormat describes the format of DateTimeStr - refer to Date Format Specifiers for help creating DateTimeFormat parameter.