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 / How to convert a time ...
Power Apps
Answered

How to convert a time value to a decimal value

(0) ShareShare
ReportReport
Posted on by 19

Hi.  I'm trying to convert a time value to a decimal value, i.e. 7:30 = 7.5.  This date is the product of two different time picker boxes.

 

It looks like I could use DateDiff to return total minutes, however I want to use the date format in another spot (so I would use 7:30 on a label on the form and return back 7.5 to Sharepoint from my form).

 

Is there a way to do this?

 

Thanks

Categories:
  • Verified answer
    mdevaney Profile Picture
    29,993 Moderator on at

    @Arankin1 
    DATEDIFF will produce 7.5 if you change the 3rd argument to 'Hours'.

     

    DateDiff(start_datetime, end_datetime, Hours)

     

    Example:  this would return 7.5 hours.

     

    DateDiff(
     Today() + Time(2,0,0),
     Today() + Time(9,30,0),
     Hours
    )

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

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 221 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 188 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 120

Last 30 days Overall leaderboard