web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Time quantity in [h]:m...
Power Apps
Unanswered

Time quantity in [h]:mm:ss

(0) ShareShare
ReportReport
Posted on by 8

I have an app to display the required time to perform a task, most of this times are >24h. I have the data source from Excel in a column with [h]:mm:ss format.

 

I need to extract that information in the same format from Excel to PowerApps, have tried many ways and haven´t worked.

Could you please help me with an example of how to perform this requirement?

 

Thanks a lot!

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

    @josealcas 

    Is your app seeing the column in your Excel as a text column or a date column?

    Most likely seeing it as a text column.

     

    If so, then you can use the TimeValue function to get the results in a real time value.

    ex. 

       Text( TimeValue(yourColumnValue), LongTime24)

    Will convert the text to a real time value and then display it in the long time format.

     

    I hope this is helpful for you.

  • josealcas Profile Picture
    8 on at

    Hi @RandyHayes 

    Thanks a lot for your help, but this didn´t work. It shows the data as 00:00

     

    josealcas_0-1611780104781.png

     

    My Excel is as a text column.

     

    Hope you can help!

  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @josealcas 

    What does the label display if you change the Text property to : ThisItem.PLANNED_HH ?

  • josealcas Profile Picture
    8 on at

    @RandyHayes 

    It displays like this:

    josealcas_0-1611781443081.png

     

  • josealcas Profile Picture
    8 on at

    Hi Community,

    Can someone help me with this please?

  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @josealcas 

    Sorry did not see a notification that you responded to this thread.  Did you want to continue with my help on this or put it out to others?

     

    In general, from the picture, your time column in Excel is not coming into PowerApps as a Date/Time column.  It is coming in as the Excel value of the time.  Excel time values are fractions of the total number of seconds in the 24 hour period.

    Using this on the Text property of the label should show you the proper time:

    Text( Time(0, 0, ThisItem.PLANNED_HH * 93600), LongTime24)

     

  • josealcas Profile Picture
    8 on at

    Hi @RandyHayes 

    This works nice, the results are better now, but it won´t show me the hours when the time is up to >24Hours:

    josealcas_0-1611853397216.png

     

    For example this data is 40:00 Hours and shows 16:00Hours

    josealcas_1-1611853484972.png

     

    josealcas_2-1611853702470.png

     

  • Verified answer
    RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @josealcas 

    Use this formula:

    With({_excelValue: ThisItem.PLANNED_HH},
     With({_seconds:86400 * _excelValue},
     With({_hours: Hour(Time(0,0, Mod(_seconds, 86400))) + (RoundDown(_excelValue,0) *24)},
     Text(_hours, "[$-en-US]00") & ":"& 
     Text(Time(0, 0, _seconds ) , "[$-en-US]mm:ss") 
     )
     )
    )

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 793 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 333 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard