Subject | Re: [firebird-support] calculating sum of times |
---|---|
Author | Martijn Tonies |
Post date | 2005-09-06T09:59:22Z |
Hi,
the TIME or TIMESTAMP datatype. Totaltime would hold a
"duration", not a "time".
Firebird doesn't have a datatype for duration) and calculate the number
of hours.
With regards,
Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, Oracle & MS SQL
Server
Upscene Productions
http://www.upscene.com
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com
> I have the following tableYes. But what datatype is "totaltime" then? Cause it cannot be of
>
> ID Time1 Time2 TotalTime
>
> Time1 and Time2 are posted by stored procedure. Then
> in the end of processing i am doing
>
> UPDATE MyTable SET TotalTime = Time2 - Time1
>
> Am i right to assume that TotalTime will now hold the amount
> of time passed since Time1 till Time2?
the TIME or TIMESTAMP datatype. Totaltime would hold a
"duration", not a "time".
> Now...I need to calculate SUM(TotalTime) for all records in a table..See above. Calculate the duration in some specific format (given that
> And get the hours...How do i go about that?
Firebird doesn't have a datatype for duration) and calculate the number
of hours.
With regards,
Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, Oracle & MS SQL
Server
Upscene Productions
http://www.upscene.com
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com