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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Timesheet Value Error
Power Apps
Answered

Timesheet Value Error

(0) ShareShare
ReportReport
Posted on by 63
 
 
Hi
 
I have created a timesheet in which I need the users to enter a start time and end time, and then calculate the total hours worked - the function it self is working fine but when the user is typing in the times they are receiving this error and I would like for them to not get it - any ideas?
 
 
 
The code in the Total Hours Worked:
(DateDiff(
           DateTimeValue(starttime.Text),
           DateTimeValue(endtime.Text),
            TimeUnit.Minutes
        )) / 60
 
 
Categories:
  • Verified answer
    mmbr1606 Profile Picture
    14,629 Super User 2026 Season 1 on at
    hey
     
     
     
    can you maybe try this code:
    If(
        !IsBlank(starttime.Text) && !IsBlank(endtime.Text),
        (DateDiff(
            DateTimeValue(starttime.Text),
            DateTimeValue(endtime.Text),
            TimeUnit.Minutes
        )) / 60,
        0 // Default value when either Start Time or End Time is empty
    )
    
    if it worked please mark as verified answer,
     
     
    cheers

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 354 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 330

#3
Mohsin Ali Profile Picture

Mohsin Ali 232

Last 30 days Overall leaderboard