Subject Re: [firebird-support] Time calculation, with time response
Author Roberto Carlos
Thanks, Anderson.

Your solution solved my problem, I just had to adapt it and put seconds on it.

Roberto Carlos


Em 01:34, Anderson Farias   escreveu:

Hi,

>I am trying to calculate worked hours for payment just like Excel does when a cell is
>formated as [HH:mm:ss].

You can have 2 TIMESTAMP fields: START_TIME and END_TIME. Than the worked hours will be:

(END_TIME-START_TIME)*24.0

I also have to calc worked time, but in minutes and with break time. I do like this:

((END_TIME-START_TIME) - COALESCE(END_BREAK-START_BREAK,0))*1440.0

I put this on a computed field and format to 'hhh:nn' with a simple function at client side.

Regards,
Anderson Farias


[Non-text portions of this message have been removed]