|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Query of the Sum of a Time field
Hello,
I would like to make a sum with Time field but I got a error message concerning bad aritmetic datatype. This is my query : SELECT SUM(TEMPS_DIRECT) FROM WORKS; How I can make a time's sum ? Thanks ! |
|
#2
|
|||
|
|||
|
Dumb question: what's the sum of 14:36 and 22:51?
|
|
#3
|
|||
|
|||
|
Quote:
TIME datatype holds day time, not time duration, so it has no sense to sum TIMEs directly. If you (incorrectly) hold time duration in TIME field, the workaround for computing the sum is this SELECT SUM(TEMPS_DIRECT - cast('0:0' as time)) FROM WORKS; (the result is number of seconds) Ivan http://www.volny.cz/iprenosil/interbase/ |
![]() |
| Viewing: Dev Shed Forums > Databases > Firebird SQL Development > Query of the Sum of a Time field |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|