Subject | Re: difference between TIMESTAMPs |
---|---|
Author | Ali Gökçen |
Post date | 2006-04-19T10:11:48Z |
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 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:
>calculate
> I have two TIMESTAMP fields CHECKIN and CHECKOUT...I need to
> the duration between them to use in report and also get a TOTAL ofall
> 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.
>