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 / datediff display as hh:mm
Power Apps
Answered

datediff display as hh:mm

(0) ShareShare
ReportReport
Posted on by 270

hi all

 

i am trying to do a DateDiff and display the result as a time factor.

 

e.g. 13:00 start 14:00 end i'd want the datediff to display at 01:00 not 60,1,3600 etc.

 

i'm working with this at the moment but it just doesn't work

the date diff displays correctly but i cannot get the format of the seconds converted to a time factor

 

is there a way to do this?

Text(DateDiff(DateTimeValue(input_ShiftStart.Text),DateTimeValue(input_ShiftEnd.Text),Seconds),"[$-en-US]hh:mm")

Categories:
I have the same question (0)
  • StalinPonnusamy Profile Picture
    Super User 2024 Season 1 on at

    Hi @mrleetyler 

    Text(DateDiff(TimeValue(input_ShiftStart.Text),TimeValue(input_ShiftEnd.Text),Hours), "[$-en-US]00") & ":00"

     

    StalinPonnusamy_0-1632108641497.png

     

  • mrleetyler Profile Picture
    270 on at

    hey Stalin,

     

    that works fine for exact hours but in the event of for example a 90 minute datediff this method won't work

  • Verified answer
    StalinPonnusamy Profile Picture
    Super User 2024 Season 1 on at

    Hi @mrleetyler 

     

    Minutes Included.

    Text(DateDiff(TimeValue(input_ShiftStart.Text),TimeValue(input_ShiftEnd.Text),Hours), "[$-en-US]00") & ":" & Text(Mod(DateDiff(TimeValue(input_ShiftStart.Text),TimeValue(input_ShiftEnd.Text),Minutes), 60),"[$-en-US]00")

     

    StalinPonnusamy_0-1632109601472.png

     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 1,033

#2
Valantis Profile Picture

Valantis 632

#3
11manish Profile Picture

11manish 607

Last 30 days Overall leaderboard