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 Automate / Convert int compose to...
Power Automate
Unanswered

Convert int compose to hh:mm:ss

(1) ShareShare
ReportReport
Posted on by 4

Hi everyone,

I'm stuck on how to convert and int value to hh:mm:ss
The value that i extract from excel is in string format which i later convert to int in order to calculate avrage sum
The value represents time in miliseconds and i would like to convert those miliseconds (which are Int type) to hh:mm:ss
Just to let you know im building this flow in Power Automate Cloud version
Does anyone have an idea on how i could achive this?

example: value of compose is 6861 and it should be converted to 00:00:06

Thanks in advance!

Categories:
I have the same question (0)
  • Verified answer
    SudeepGhatakNZ Profile Picture
    14,394 Most Valuable Professional on at

    @P3tar94 ,

    You could use the div,mul,concat and mod functions to derive the hh:mm:ss format

     

    Say e.g. the milliseconds value is 554666861

    You get days by dividing your input by 3600000*24

    SudeepGhatakNZ_0-1687480823118.png

    Which is 554666861/(3600000*24) = 6.419755336 days = 6 days

      

    You get the hours by multiplying the remainder with 24

    Which is .419755336 * 24 = 10.07412806 hours = 10 hours

     

    You get minutes by multiplying the remainder of the previous action by 60

     Which is .07412806* 60 = 4.4476836 minutes = 4 min

     

    You get seconds by multiplying the remainder of the previous action by 60

     Which is .4476836 * 60 = 26.861016 seconds = 26 seconds

     

    Verify here

    Convert Milliseconds to Hours, Minutes and Seconds (daftlogic.com)

    SudeepGhatakNZ_0-1687481682014.png

     

     

  • P3tar94 Profile Picture
    4 on at

    @SudeepGhatakNZ Thanks for repplying!
    I ended up creating 3 different variables called Hours,Minutes,Seconds and as you can guess i devided the output to represent each of the variable
    At the end i've created a new compose that will give an output for what i've needed
    The expresion for the compose was: 

    concat(formatNumber(variables('Hours'), '00'), ':', formatNumber(variables('Minutes'), '00'), ':', formatNumber(variables('Seconds'), '00'))

    I hope someone will find this helpful!

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 Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard