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 Automate / Decimal Houre to ISO 8601
Power Automate
Answered

Decimal Houre to ISO 8601

(0) ShareShare
ReportReport
Posted on by 24

Hello,

How to transform an hour in decimal from an excel to HH:mm on flow?

start.JPG

Thanks 

Categories:
  • DeepakS Profile Picture
    2,301 Most Valuable Professional on at

    Hi @nexago 

     

    Use Following expression and change : outputs('DecimalHrs') with  your decimal time value

     

    concat(split(string(outputs('DecimalHrs')),'.')[0],':',split(string(mul(float(concat('.',split(string(outputs('DecimalHrs')),'.')[1])),60)),'.')[0],':',string(mul(float(concat('.',split(string(mul(float(concat('.',split(string(outputs('DecimalHrs')),'.')[1])),60)),'.')[1])),60)))
     

    -------------------------------------------------------------------------
    If I have answered your question, please mark your post as Solved.
    If you like my response, please give it a Thumbs Up.

     

  • nexago Profile Picture
    24 on at

    Thanks for your quick answer @DeepakS , I would never have found that expression 😅

    However, I make a mistake when I want to apply it:

    impossible to process the template language expressions in the action entries "Message" in line "1" and column "2786": "Impossible to evaluate the template language expression .
    because the array index "1" is outside the limits (0, 0) of the array. For usage details, see https://aka.ms/logicexpressions

    applying your solution:

    CaptureHeure.JPG

     

    Error:
    Capture.JPG

  • nexago Profile Picture
    24 on at

    I only want to convert 0.5 to 12:00 with a function in flow.

  • DeepakS Profile Picture
    2,301 Most Valuable Professional on at

    Hi @nexago 

     

    i forgot that we can have 0 also :(, here is the updated expression. I break it into Hrs,Min,and Second so easy to understand:

    Hrs:  split(string(outputs('DecimalHrs')),'.')[0]

    Min: if(contains(string(outputs('DecimalHrs')),'.'),split(string(mul(float(concat('.',split(string(outputs('DecimalHrs')),'.')[1])),60)),'.')[0],0)

    Sec: if(equals(outputs('Min'),0),0,if(contains(string(mul(float(concat('.',split(string(outputs('DecimalHrs')),'.')[1])),60)),'.'),string(mul(float(concat('.',split(string(mul(float(concat('.',split(string(outputs('DecimalHrs')),'.')[1])),60)),'.')[1])),60))

    ,'0'))
    Final Time: concat(outputs('Hours'),':',outputs('Min'),':',outputs('Sec'))
    DecNum.png
     
    I tested this with 50 unique combination so hopefully this should works for you.
     
    -------------------------------------------------------------------------
    If I have answered your question, please mark your post as Solved.
    If you like my response, please give it a Thumbs Up.

     

  • nexago Profile Picture
    24 on at

    Thanks for your quick answer @DeepakS , but when I apply your solution the result for 0.5 is 0:30:0 is not 12:00.

  • Verified answer
    DeepakS Profile Picture
    2,301 Most Valuable Professional on at

    Hi @nexago 

     

    I realize that your decimal number is days. I provided expressions for Hours. to help you out I created a Power Automate that will address two decimal type - Days and Hours
    I added a solution to my GitHub.Feel free to download and use as you want.

    Link: https://github.com/DeepakS22/DPowerAutomate/

    Solution File Name: DecimalNumberToTime_20200223011514.zip

     

    -------------------------------------------------------------------------
    If I have answered your question, please mark your post as Solved.
    If you like my response, please give it a Thumbs Up.

     

     

     

  • nexago Profile Picture
    24 on at

    Beautiful, great job @DeepakS  😊. I'm almost done with my conversion. I still have one small problem with your solution is when I want to make an Outlook event in the form "yyyy-mm-ddT00:00:00Z". The result I get with your solution is h:m:s instead of hh:mm:ss.


    Thanks again for your help.

  • DeepakS Profile Picture
    2,301 Most Valuable Professional on at

    Hi @nexago 

     

    To format final result as HH:MM:SS you may need add one more condition (if value is <= 9 then concat 0 )

     

    I will update my solution in some time little swamped with work.

    -------------------------------------------------------------------------
    If I have answered your question, please mark your post as Solved.
    If you like my response, please give it a Thumbs Up. 

  • nexago Profile Picture
    24 on at

    @DeepakS I'm gonna wait for your solution, because I can't do the concat 0 😅

    Thanks again 😊

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 430

#2
11manish Profile Picture

11manish 341 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 282

Last 30 days Overall leaderboard