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

View solution in original post

Gorilla_8
Impactful Individual
Impactful Individual

@rubin_boer 

 

Thank you very much for the solution!

I was struggling with this! 


Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

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