I know how to use python's time to convert "1328834615" to a date.
>>> import time
>>> time.ctime(1328834615)
'Fri Feb 10 08:43:35 2012'
How do I do it using Delphi?
Try using the UnixToDateTime
function which is part of the DateUtils unit.
{$APPTYPE CONSOLE}
uses
DateUtils,
SysUtils;
Var
Dt : TDateTime;
begin
try
Dt := UnixToDateTime(1328834615);
//do something
Writeln(FormatDateTime('ddd mmm d hh:nn:ss yyyy', Dt));
except
on E: Exception do
Writeln(E.ClassName, ': ', E.Message);
end;
Readln;
end.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With