Forum Discussion
bsharp
5 years agoFrequent Visitor
Converting number to a time again
Can someone help me conver this data to a time? I need the TrnTime to be in HH:MM:SS:MS I tried to modify this but I'm not having much luck.
- Anonymous5 years ago
HI bsharp ,
You can try this
HHMMSS = INT(Table[TimeSpent] / 3600) & ":" & RIGHT("0" & INT((Table[TimeSpent] - INT(Table[TimeSpent] / 3600) * 3600) / 60), 2) & ":" & RIGHT("0" & MOD(Table[TimeSpent], 3600), 2)You can also have a look at this article
https://gist.github.com/jongio/5b8dcf13ab957cecfec3932a42db0e58
https://community.powerbi.com/t5/Quick-Measures-Gallery/Milliseconds-Duration/m-p/406698
Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)