[fpc-pascal] Ho to convert a special format of datetime?

silvioprog silvioprog at gmail.com
Thu Dec 13 21:31:09 CET 2018


On Thu, Dec 13, 2018 at 5:07 PM luciano de souza <luchyanus at gmail.com>
wrote:

> Hello all,
> I'd like to convert this date "2017-01-11T17:47:22.2912317-02:00" to
> TDatetime.
>

uses restbase;

var
  d: TDateTime;
begin
  d := RFC3339ToDateTime('2017-01-11T17:47:22.2912317-02:00');
  WriteLn(DateTimeToStr(d)); // prints 11-1-17 17:47:22
end.

Anyway, I'm not sure regarding the tmz part, so take a look at Marco's
answer.

-- 
Silvio Cl├ęcio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20181213/bac7a56f/attachment.html>


More information about the fpc-pascal mailing list