Announcements
Good afternoon.
I'm trying to convert my hours in numeric format to string format hh:mm.
I am using this code
With( { wFindSplit: Find( ""; ThisItem.'Quantidade de horas' ); wLenTxt: Len(ThisItem.'Quantidade de horas') }; Left( ThisItem.'Quantidade de horas'; wFindSplit ) & ":" & Round( Value( Right( ThisItem.'Quantidade de horas'; wLenTxt - wFindSplit ) ) *60; 0 ) )
@Fioravanti ,
It should be something like this
With( { _Hours: RoundDown( ThisItem.'Quantidade de horas', 0 ) }, Text(_Hours, "00") & ":" & Text( Round( Mod( ThisItem.'Quantidade de horas', _Hours ) *60, 2 ), "00" ) )
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
MVP (Business Applications) Visit my blog Practical Power Apps
The hours solved it, now the minutes didn't solve it.
It did not bring the value I selected.
In other words, I selected 23:35, the result came to me at 23:01
Left a bit out - try now
Hello,
Let me give you few hints:
1 - in line 4 are do you miss to find separator like "." or "," because in your code there is ""
2 - do you have your numeric value 'Quantidade de horas' as number? If yes then you should use it as number , if not this is strange but still you can transform it to number using Value() like Value("34.4")
So I would simplify the code like this
With( //arg {hourValue: 32.5}; // round to integer number Text(RoundDown(hourValue;0) ) & ":" & // decimal value after separator muitiplied by 60 minutes to round to integer Text(Round((hourValue - RoundDown(hourValue;0)) * 60;0)) )
>> returns "32:30"
Let me know
You are the best.
@WarrenBelz I have a lot of difficulty with these time conversions.
It worked perfectly, once again. thank you very much
Another way to format the number of hours in the hh:mm format would be to use something like the expression below:
Text(Time(0, ThisItem.'Quantidade de horas' * 60, 0), "hh:mm")
Hope this helps!
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.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
11manish 224 Super User 2026 Season 2
WarrenBelz 189 Most Valuable Professional
Mohsin Ali 126