PavelX 1 Posted November 25, 2020 Hi, How to include timezone into StrToDateTime format I want to convert the following string "Wed, 11 Nov 2020 22:44:00 +0000" to DateTime Thank you in advance Paul Share this post Link to post
PavelX 1 Posted November 25, 2020 (edited) It looks like this is a RFC822 format and can be converted using a Indy function StrInternetToDateTime from IdGlobalProtocols Edited November 25, 2020 by PavelX Share this post Link to post
Remy Lebeau 1393 Posted November 25, 2020 (edited) Or the GMTToLocalDateTime() function, also in the IdGlobalProtocols unit. StrInternetToDateTime() ignores the timezone specified in the input string and just returns the date/time as-is. GMTToLocalDateTime() adjusts the date/time into UTC using the specified timezone, and then adjusts the UTC into the local timezone on output. Edited November 25, 2020 by Remy Lebeau Share this post Link to post