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 Platform Community / Forums / Power Apps / DateDiff Days Hours Mi...
Power Apps
Answered

DateDiff Days Hours Minutes

(0) ShareShare
ReportReport
Posted on by 23

Hello again,I’m struggling with a DateDiff funciton. I have two dates with hours and minutes values. I want to check how many hours of difference there is and divide it by 24 hours, get a number of days left and spare hours which will be used later on.

DateValue1

HourValue1

MinuteValue1

DateValue2

HourValue2

MinuteValue2

Categories:
I have the same question (0)
  • Verified answer
    mdevaney Profile Picture
    29,989 Moderator on at

    @Draqon 

    Days between

    RoundDown(DateDiff(DateValue2.SelectedDate + Time(HourValue2.Selected.Value, MinuteValue2.Selected.Value,0), DateValue1.SelectedDate + Time(HourValue1.Selected.Value, MinuteValue1.Selected.Value,0), Days),0)

     

    Spare hours

    RoundDown(Mod(DateDiff(DateValue2.SelectedDate + Time(HourValue2.Selected.Value, MinuteValue2.Selected.Value,0), DateValue1.SelectedDate + Time(HourValue1.Selected.Value, MinuteValue1.Selected.Value,0), Hours), 24),0)

     

    Spare minutes

    RoundDown(Mod(DateDiff(DateValue2.SelectedDate + Time(HourValue2.Selected.Value, MinuteValue2.Selected.Value,0), DateValue1.SelectedDate + Time(HourValue1.Selected.Value, MinuteValue1.Selected.Value,0), Minutes), 60),0)

     

    ---
    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

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 739 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 268

Last 30 days Overall leaderboard