You are not logged in.
Pages: 1
Hi AB,
Today exists Iso8601ToDateTime only RawUTF8 to TDateTime.
It´s possible new function add in SynCommons to convert Int64 to TDateTime?
Sample:
function Iso8601ToDateTime(const Value: Int64): TDateTime; overload;
begin
Result := PIso8601(@Value)^.ToDateTime;
end;
I need using with IncDay.
Sample:
ReferenceDate := IncDay(Iso8601ToDateTime(MySQLRecord.CreatedAt), Days);
Offline
In Delphi 6 "Internal error: URW699" when compiling.
But PIso8601 (@ ADataIso8601mORMot) ^. ToDateTime works.
Iso8601ToDateTime is simpler
Offline
We have renamed Iso8601 low-level structure as TTimeLogBits, and use explicitly the TTimeLog type and name for all Int64 bit-oriented functions - now *Iso8601* will be used only for standard ISO-8601 textual representation.
See http://synopse.info/fossil/info/e6c05e58a9
Then, we added a new TimeLogToDateTime() function, to fulfill your expectations.
You can now write:
aTimeStamp := TimeLogFromDateTime(IncDay(TimeLogToDateTime(aTimeStamp)));
Thanks for the feedback!
Offline
thanks AB
Offline
Pages: 1