[fpc-pascal] Converting from seconds to TTime: easiest way?

Reinier Olislagers reinierolislagers at gmail.com
Thu Jun 21 08:10:09 CEST 2012


On 20-6-2012 19:59, Sven Barth wrote:
> 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 ;) ):
Good point ;)
> 
> MyTTime := HugeNumberOfSecondsInteger * OneSecond;
Thanks.



More information about the fpc-pascal mailing list