web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Apps
Answered

Time Clock

(0) ShareShare
ReportReport
Posted on by 209

Hello! I created a time clock app in power apps and sent the "Punch In" & "Punch Out" data  to share point. What would be the formula to show hours total hours worked?

hours.PNG

What I have so far

hours2.PNG

 

Categories:
I have the same question (0)
  • LaurensM Profile Picture
    12,516 Moderator on at

    Hi @Broly123,

     

    You could use the following function in the Text property of a label:

    DateDiff(startTime, endTime, TimeUnit.Hours)

    Make sure to add a record reference before the column names (ThisItem, ThisRecord, record saved to a variable...)

     

    If this solves your question, would you be so kind as to accept it as a solution & give it a thumbs up.

    Thanks!

  • Verified answer
    LaurensM Profile Picture
    12,516 Moderator on at

    My apologies @Broly123, clearly missed the fact that this was about a calculated column in SP.

     

    Give the following code a try in a Calculated number column:

    =IF(
     AND(
     NOT(ISBLANK(endTime)),
     NOT(ISBLANK(startTime))
     ),
     (endTime-startTime)*24,
     0
    )

     

    I hope this helps!

  • Broly123 Profile Picture
    209 on at

    @LaurensM Thanks it worked! I forgot to mention a 30min break. Would the formula be something like?

    =IF(AND(NOT(ISBLANK(endTime)),NOT(ISBLANK(startTime))),(endTime-startTime)*24-0.5,0)

     

    And is there a way to calculate times for an entire week in sharepoint?

  • LaurensM Profile Picture
    12,516 Moderator on at

    Hi @Broly123,

     

    The formula looks good to me. 😊

     

    What I would recommend regarding your last question is to start a new topic. I have a few ideas in order to achieve this, but I don't think they are best practice or the most efficient.

     

    Other community members with more SharePoint expertise might be able to assist you here. 

  • Broly123 Profile Picture
    209 on at

    @LaurensM Nice! Thanks a ton!

  • oyepanky Profile Picture
    361 on at

    oyepanky_0-1715870518477.jpeg

     

    Hi Bro,

     

    if you need any help with attendance related help, I already developed this application you can check out my videos on youtube.

     

    link is here - Time IN And Out Button Create with Formula In PowerApps || Part-14
    https://youtu.be/sFbAlSRD_qc

     

    in this application these options

     

    Check In - Check Out

    Break options 
    Selfie option 

    location option

    20+ option for employees & Manager login 

     

    please check out all parts 

    i hope this video help you. 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard