Subject Re: difference between TIMESTAMPs
Author Ali Gökçen
Ops to me!
i forgot to convert difference of timestamps to seconds before
calculation.
I leaved this industry last week,
how human brain have tendecy to forget. :)

--- In firebird-support@yahoogroups.com, Ali Gökçen <ali_gokcen@...>
wrote:
>
> hey hey... relax Martijn,
> i don't want another fighting over time issue.. ;)
>
> Hi dude,
> TIMESTAMP is a time-detailed calendar data format.
> Can you represent difference of two calendartimes as in calender
> format?
> No, of course.
>
> But you can display it in human readable format:
>
> (checkout-checkin)/84000 gives you the number of days delta.
>
> cast('00:00' + ((checkout-checkin)-(days*84000)) as time)
>
> gives you remainder time value in time display format.
>
> As you see, there is two result and usage of them is up to u.
>
> Regards.
> Ali
>
>
>
> --- In firebird-support@yahoogroups.com, "d_dude_2003"
> <d_dude_2003@> wrote:
> >
> > I have two TIMESTAMP fields CHECKIN and CHECKOUT...I need to
> calculate
> > the duration between them to use in report and also get a TOTAL
of
> all
> > durations...
> >
> > How do i SELECT a duration in propert format, like 01:20...
> >
> > I tried CAST(CHECKOUT - CHECKIN AS TIMESTAMP) but i have
conversion
> > error...
> >
> > Thanks.
> >
>