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 / Problem calculating th...
Power Apps
Unanswered

Problem calculating the duration whit Date Diff

(0) ShareShare
ReportReport
Posted on by 15

 

Hello im using an excel file stored on one drive,

So im calculating in my app the duration of some activities where i can put the initial date and the end date of the activity, and im using Date diff  to calculate the duration of the activity,

So for example the initial date was 00:00:00 and the final date was 00:10:00 so the duration will be 10 minutes or 0,167 hours (ill leave a pic of the problem down there), so far so good the app shows me the 0,167 value as a duration, but when i save that and check the excel file on one drive, the duration appears like 167, which clearly is the incorrect value, it is like the app or something is multiplying by 1000 at some point .

im using a datacard whit the function:  Value(Round((DateDiff(TimeValue(HoraInicio.Text);TimeValue(HoraFin.Text);Minutes)/60);3);"es-ES"))

where: 

Hora inicio is the initial date in hours,
Hora Fin is the final date in hours, 

Duración.PNG

pppp.PNG

 

 

Ill appreciate some help,

Stay safe out there. 

 

Categories:
I have the same question (0)
  • Vijay Tailor Profile Picture
    2,961 on at

    Hi @pracmt1515 ,

    For this Requirment.

    You need to change the Formatting For Excel Field that resides in Onedrive Excel Table.
    Basically, PowerAPp Pass the correct data but this value change on the excel side.

    please change the Excel Column Formatting to Text or something else that fits your requirement.

    Thanks,
    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."

  • pracmt1515 Profile Picture
    15 on at

    I try it but it didn't work, im thinking that the problem may be that the number is too small so excel confuses the coma whit a dot, and that changes the value of 0,167 to 167,

    ¿what do you think?, maybe a solution for that is to put the duration in minutes and not in hours.

  • Vijay Tailor Profile Picture
    2,961 on at

    Hi @pracmt1515 ,

    Change the Excel Column Formate as Text.

    VijayTailor_0-1602192912574.png


    And Pass the value a text from Power App.
    Thanks,
    Hope to help you to resolve your Issue

  • pracmt1515 Profile Picture
    15 on at

    Thanks ill let you know if it works, 

    Stay safe!

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 846

#2
Valantis Profile Picture

Valantis 532

#3
Haque Profile Picture

Haque 410

Last 30 days Overall leaderboard