Subject | Re: [firebird-support] timestamp arithmetic |
---|---|
Author | Lele Gaifax |
Post date | 2003-07-16T09:37:33Z |
>>>>> Edwin Pratomo l'ha dit:Edwin> hi, what is the recommended way to do arithmetic on
Edwin> timestamp field? for example, how to add 7 hours to a
Edwin> timestamp value?
A timestamp field is composed by an integer part that carries the
number of day elapsed since the day 1, and a fractional part
equivalent to the fraction of day:
UPDATE table SET yourfield + 7.0/24.0
hth,
bye, lele.
--
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
email: lele@... | -- Fortunato Depero, 1929.