cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Gorilla_8
Impactful Individual
Impactful Individual

DateDiff hours between date ,hour and minute

I wanna calculate difference between:

Many days, and the hours and minutes between those days

For example:

12/03/2021 08: 54 until 12/09/2021 16:48

Display the result: 6 days, Hours:Minutes

1 ACCEPTED SOLUTION

Accepted Solutions
rubin_boer
Super User
Super User

hi @Gorilla_8 noted, as the datepicker don't provide the functionality for hours and minutes consider the following:

rubin_boer_0-1638543568556.png

 

Hope it helps,

R

View solution in original post

4 REPLIES 4
rubin_boer
Super User
Super User

hi @Gorilla_8 

 

you can try

With(
    { 
        StartDate:DateTimeValue("12/03/2021 08:54"), //replace the date with yourValue 
        EndDate:DateTimeValue("12/09/2021 16:48") //replace the datestring with yourValue
    },
        DateDiff(StartDate,EndDate) & " days, " & Abs(Hour(EndDate) - Hour(StartDate)) & " hours: " &Abs(Minute(EndDate) - Minute(StartDate)) & " minutes"
)

 

Hope it helps

R

Gorilla_8
Impactful Individual
Impactful Individual

@rubin_boer 

 

Thank you very much for the response, but I need to compare datepicker values with hour and minutes.

rubin_boer
Super User
Super User

hi @Gorilla_8 noted, as the datepicker don't provide the functionality for hours and minutes consider the following:

rubin_boer_0-1638543568556.png

 

Hope it helps,

R

Gorilla_8
Impactful Individual
Impactful Individual

@rubin_boer 

 

Thank you very much for the solution!

I was struggling with this! 


Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (3,259)