Re: [firebird-support] How do I get the differences between 2 timestamps as a timestamp.

2013-06-04 Thread Cornie van Schoor
Hi I am not sure if it is really legal and if it will always work, but this works for me for now. Period = dateadd(minute, datediff(minute, Start_Date, End_Date), cast('30.12.1899 00:00' as Timestamp)) will change the Period to Integer and save the DateDiff(minute ...) in it, when I have

[firebird-support] How do I get the differences between 2 timestamps as a timestamp.

2013-06-03 Thread cornievs
I have the following table (Staff_Events) ... Start_Date TIMESTAMP, End_Date TIMESTAMP, Period TIMESTAMP, and need to set Period to the time difference between End_Date and Start_Date. End_Date will always be later than Start_Date. (Enforce by on Insert/Update triggers.) I know I

Re: [firebird-support] How do I get the differences between 2 timestamps as a timestamp.

2013-06-03 Thread Doug Chamberlin
On Mon, Jun 3, 2013 at 8:01 PM, cornievs corni...@gmail.com wrote: I know I can the get difference with DATEDIFF, but I need the result as a TimeStamp. That does not make much sense. A timestamp is a point in time. A time period is a duration of time, not a point in time. The appropriate type

Re: [firebird-support] How do I get the differences between 2 timestamps as a timestamp.

2013-06-03 Thread Helen Borrie
At 12:01 p.m. 4/06/2013, cornievs wrote: I have the following table (Staff_Events) ... Start_Date TIMESTAMP, End_Date TIMESTAMP, Period TIMESTAMP, and need to set Period to the time difference between End_Date and Start_Date. End_Date will always be later than Start_Date. (Enforce