[fpc-pascal] Converting http date back to TDateTime

Zamrony P. Juhara zamronypj at yahoo.com
Wed Apr 29 04:29:27 CEST 2020

How do I convert string with HTTP date format such as
Wed, 29 Apr 2020 10:35:50 GMT
back to its TDateTime value?
I try with ScanDateTime()
adateTime := ScanDateTime(     'ddd", "dd" "mmm" "yyyy" "hh:mm:ss" GMT"',     'Wed, 29 Apr 2020 10:35:50 GMT');
but EConvertError exception is raised with message 
Mismatch char " " <> "," at pattern position 5, string position 5

ZamroniFano Framework https://fanoframework.github.io

Zamrony P. Juhara
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20200429/ff4d1657/attachment-0001.html>

More information about the fpc-pascal mailing list