Subject Re: [firebird-support] How to do Time calculation
Author Martijn Tonies
>> Next, the result of one particular date/time minus another does not
>> result in a date or time, you should know that. It results in a
>> "duration",
>> which is stored in a format you would like, eg "integer" (depending on
>> how precise you want it).
>>
>> Subtracting one "clockdatetime" from another (end-start) gives you the
>> duration.
>>
>> With regards,
>>
>> Martijn Tonies
>
> huh?
> the result is a decimal. The integer part is number of days. The decimal
> part is a fraction of one day.
> 1.5 = 24+12= 36 hours.
> 1.05892 = 25.41408 hours or 1 day 1 hour 24 minutes 51 secs

Right ;-) After some calculation, you can store it in an integer :-)

With regards,

Martijn Tonies
Upscene Productions
http://www.upscene.com

Download Database Workbench for Oracle, MS SQL Server, Sybase SQL
Anywhere, MySQL, InterBase, NexusDB and Firebird!

Database questions? Check the forum:
http://www.databasedevelopmentforum.com