4

Can anyone suggest a Delphi library that will covert a date string in the RFC 822 format to a TDateTime?

e.g. 24 Oct 2011 13:54:55 -0000

I imagine this is something that you could easily get wrong due to slight variations in formats returned by servers, so a tried and tested routine would be good.

Can this be achieved with the built in StrToDateTime routine using a custom short date format sting?

Note: I'm using Delphi 2010

Jamie
  • 3,150
  • 2
  • 26
  • 35

1 Answers1

13

Indy's TIdDateTimeStamp (since Indy 9) has SetFromRFC822 method which calls StrInternetToDateTime.

Ondrej Kelle
  • 36,941
  • 2
  • 65
  • 128
  • 1
    Since Indy 10 [StrInternetToDateTime](http://www.e-iter.net/Knowledge/Indy10/StrInternetToDateTime@string.html) is located in the IdGlobalProtocols unit – splash Mar 31 '14 at 13:00