Is there any simple option to convert a U.S. TDateTime value Apr 17, 2014 8:35:38 PM PDT to a European format looking like 2014-04-17 20:35:38?
EDIT:
I have a string containing raw date/time in U.S. format:
var s, new_s: string;
begin
s := 'Apr 17, 2014 8:35:38 PM PDT';
I want to somehow read/parse this string to a variable of TDateTime type -or- just convert it to another string of the desired format:
new_s := MyConvertDateTimeSring(s);
// now new_s must be '2014-04-17 20:35:38';
end;
(Delphi XE4)
If you remove the TimeZone PDT from the string then you can use
VarToDateTimeto convert the string into aTDateTimevalueThe result will be