How to calculate duty hours in one day with one click

This sample app shows how you can calculate cumulative duty hours with one click.

5 23 1,285
23 REPLIES 23

I tried to click on the Google icon to sign in but couldnโ€™t, for some reason. Is there a way to open this in a separate window?

Open the app directly from www.appsheet.com/portfolio/531778. App name is โ€œIn Dutyโ€

@Aleksi We could use this also for a Stopwatch

Some kind ofโ€ฆ why not.

Hi Aleksi! How are you?
If I trigger the โ€œINโ€ 2 hours latter I click โ€œOUTโ€, and a couple of days latter I make the same trigger process.
Does the function SUM the time of 2 days or it just sum the actual time between triggers no matter how many days are between INยดs and OUTยดs?

It should calculate durations between IN & OUT, not OUT & IN.

Ok.
Another question, how can show a CONCATENATE format that shows Hours, minutes and seconds?

Hi Aleksi!
How could I get a 00:00:00 hour format from this formula? : IF([IN OR OUT]=โ€œPAUSAโ€,LOOKUP([_THISROW].[ID],Comentarios, ID,IN)+TOTALHOURS([TIMESTAMP]-LOOKUP([_THISROW].[ID],Comentarios, ID,TIMESTAMP)),
LOOKUP([_THISROW].[ID],Comentarios, ID,IN))

Hi, may I ask what is the result now?

Hi!
The result is Decimal 0.0603

And you want to convert the decimal to hour format as 00:03:37?

Yes thatยดs correct!
How can I do that?

Do you want to calculate seconds as well?

If itยดs posible yes.

Try something likeโ€ฆ

RIGHT("0"&FLOOR([Decimal]),2)&":"&
RIGHT("0"&FLOOR(0.6*MOD([Decimal]*100,100)),2)&":"&
RIGHT("0"&ROUND(0.6*MOD(60*MOD([Decimal]*100,100),100)),2)

Thanks Aleksi!

Youโ€™re welcome

Hey Aleksi!
Another question.
I need to take this kind of time mesure for 12 different users in the same table, but I need to calcualte the time for each of thouse users.
I can duplicate the amount of columns of the โ€œcronoโ€ logic for the amount of users 12, but that I think it would be a lot of columns. Is there a way to do it without duplicate the amount of columns so I can take the time for each user?
Also, what happens if the โ€œcronoโ€ reach 99:59:59, is going to grow on houndreds of hours? 100:00:00

If one user has his own record, why donโ€™t you calculate it with a normal column so it will calculate it when the decimal is added?

Can you elaborate?

Iโ€™m assuming you have 12 records in your tableโ€ฆ one record for each user. Those records contain a decimal value and now you would like to convert it as duration. If you add one extra column with that formula (in app formula field), it will do the conversation at the same time when that record is created and decimal value is added.

Ok! @Aleksi
Also, what happens if the โ€œcronoโ€ reach 99:59:59, is going to grow on houndreds of hours? 100:00:00

Thilina
Participant IV

Hi @Aleksi

I have a requirement where I need to calculate total duration at a specific stage, in my app there are stages called, BA stage Dev Stage and QA Stage, basically a record changes stage according to the input given in each stage. This can go forwards or backwards (Eg: Dev completes his task which sends it to QA Stage, QA checks it and fails it, sending it back to Dev then again Dev fixes and sends to QA and QA passes it) in this kind of scenario, how can I get the total time the task was at Dev stage and at QA Stage?

Thanks

Top Labels in this Space