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 Decimal to Hours
Power Automate
Answered

Convert Decimal to Hours

(0) ShareShare
ReportReport
Posted on by 91

Hi All,

 

Seems fairly simple however I cannot find a way to do this within a flow.

 

When an item is created it produces a decimal which is a percentage of a working day (8 hrs).

 

For example someone requests 2hrs and 0.25 is the output.

 

I cannot change the way the the calculation is originally produced.

 

I need to be able to change 0.25 to 2:00 in a flow.

 

Fingers crossed

 

Clint

Categories:
I have the same question (0)
  • Mira Ghaly Profile Picture
    11,413 Moderator on at

    @ClintRB 

    Please try adding a compose data operation with the below expression

    mul(0.25,8) where you need to replace 0.25 with your decimal number
     

     

  • ClintRB Profile Picture
    91 on at

    Hi @Mira_Ghaly 

     

    Thank you for the quick reply.  For some reason I cannot add the specific column into the expression.

     

    The image below is just the test I am doing.  The decimal will come from a sharepoint list when in the correct flow arrangement.  Currently the decimal is put into a table form the main flow so I can keep a record.  WorkDays is the Table and List header.

     

    So this would be the expression if it worked.  mul(['WorkDays'],8).  But it needs to be represented as 2:00 not 2.00.

     

    Screenshot 1.2.2021.jpg

     

    Thank you

     

    Clint

  • Mira Ghaly Profile Picture
    11,413 Moderator on at

    @ClintRB

    You need to add apply for each loop after the list rows in a table, then add the compose action inside the apply for each loop. 

     

  • ClintRB Profile Picture
    91 on at

    Thanks @Mira_Ghaly , still no joy.  I have tried all sorts of configurations and nothing works.

     

    Will continue tomorrow.

     

    Clint

  • Mira Ghaly Profile Picture
    11,413 Moderator on at

    @ClintRB 

    Please check below

    Mira_Ghaly_0-1612176555223.png

    In your compose action: please use:

    mul(items('Apply_to_each')?['WorkDays'],8)
    WorkDays should be your column name in your excel sheet
     

     

  • ClintRB Profile Picture
    91 on at

    Thanks @Mira_Ghaly  I will give it a try tomorrow and let you know.  I think I have tried this expression but maybe slightly different.  Fingers crossed.

     

    Clint

  • Verified answer
    ClintRB Profile Picture
    91 on at

    Hi @Mira_Ghaly 

     

    This has been an ordeal however finally have it working.  The issue is that the decimal was a string coming from an App.  So this is a small part of the flow however was what you had helped me with. 

     

    Thank you.

     

    Clint

     

    WorkDay.jpg

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 519 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 296 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard