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
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (3,109)