[fpc-pascal] Converting from seconds to TTime: easiest way?
pascaldragon at googlemail.com
Wed Jun 20 19:59:38 CEST 2012
Am 20.06.2012 12:16, schrieb Reinier Olislagers:
> On 20-6-2012 11:53, dhkblaszyk at zeelandnet.nl wrote:
>> MyTTime := HugeNumberOfSecondsInteger / (3600 * 24);
> Bedankt, Darius.
> That's indeed shorter and fairly clear... but the advantage of the other
> way is that I don't need to remember what units TTime uses internally... ;)
You could rely on constants provided by the "dateutils" unit (I'm rather
sure that we'd provide approbiate replacements if we'd change the
TDateTime type somewhen ;) ):
MyTTime := HugeNumberOfSecondsInteger * OneSecond;
More information about the fpc-pascal