cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
biancadevera
Helper III
Helper III

Timesheet tracker Date and Time

Currently working on the Timesheet tracker by @RandyHayes . I have questions regarding dates:

  • How will it not reset the check in for the day? For example, my check in time is 9PM (July 7) then my check out should be 6AM (July 8). I would like the logic to be Check In shouldn't be available unless Check out has been clicked.
  • How can I add computation of hours? Check Out minus Check In. This is to get the rendered hours of the individual.
4 REPLIES 4
Sunil-Narnaware
Super User
Super User

@biancadevera how are you capturing Check In and Check Out? What's the action?

And for computation of hours use below formula.. replace with appropriate values for check in & check out..

DateDiff( DateTimeValue('Check In DateTime Value'), DateTimeValue('CheckOut Date Time Value'),Hours)

 

RandyHayes
Super User
Super User

@biancadevera 

The sample Time Tracker app you are following was only intended to track daily times, not times that would cross the day boundary (i.e. 12 AM)

You could implement an offset time on all of your calculations, to account for the day boundary, but it is a challenge to do.  

So, in other words, the architecture of that app was very specific to just a day.  It would need to be adjusted completely for different periods of time.

As for the hour calculations, some years ago I replied to someone on this forum with an app that does summing of all the people and hours from the app.  I'd hunt it down, but I feel it might not be worth it in this case since you really need to address non-day boundaries for check in/out.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
biancadevera
Helper III
Helper III

Hi @RandyHayes 

 

Thanks for the response. Could you please give me an example on how I could offset time? I'm also looking into possibility of multiple check ins/outs per day for employees who have flexible time. Would this be a challenge as well?

RandyHayes
Super User
Super User

@biancadevera 

Well, the reality is, since you want not only that but also the multiple check ins and outs, that the architecture of that app is not really going to work for you.

What I would recommend is to restructure it to always work with the LAST record recorded for the user that does NOT have a check out time in it - or a new one if none exists.

The app was designed to do more of a record per day per user.  So with the above concept, you would instead have a record per check in/check out per user and the day is not relevant.

That would give you the multiple check in/out ability and also cover the check out on another day.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Helpful resources

Announcements
Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Government Carousel

New forum: GCC, GCCH, DoD - Federal App Makers (FAM)

In response to the unique and evolving requirements of the United States public sector, Microsoft has created Power Apps US Government.

Users online (4,135)