Forum: Object-Pascal / Delphi-Language
Delphi
by Der schöne Günther,
24. Jan 2017
You don't need regular expressions if you just want to get the ISO8601 representation of a TDateTime. There's already a built-in DateToISO8601(..) method for that :-)
Forum: Object-Pascal / Delphi-Language
Delphi
by Der schöne Günther,
24. Jan 2017
This is two steps:
Parsing the String into a TDateTime
Converting the TDateTime in UTC timezone to your local timezone
For Task 1, there is already a built-in routine if the String is a timestamp in ISO8601 format: ISO8601ToDate(..). This method can also automatically take care of converting to your local timezone or return UTC timezone.
But your example is not. A valid ISO8601...