Skip to main content
Community site session details

Community site session details

Session Id : 0V7h3//wkguJAYZ1xH3ok6
Power Automate - General Discussion
Answered

Convert Hours in to Days and hour

Like (0) ShareShare
ReportReport
Posted on 20 Sep 2019 10:21:22 by 80

Hi All.
I wanted to convert hours into days and hour. Ex - 75 into 3 days 3 hours.
I'm trying to achieve div(75,24) = 3.125.
I get the fraction value(.125) using split function.
Multiply reminder with 24 like mul(24,.125) but Mul expression does not accept the fraction value.
Please let me know how to convert hours into Days and hours

 

 

  • Verified answer
    LeeHarris Profile Picture
    1,026 on 20 Sep 2019 at 12:46:53
    Re: Convert Hours in to Days and hour

    Hi @azeesdinu 

    The below expression should give you the output you need (where 75 is an example number of hours that can be replaced with a dynamic value).

     

    concat(int(div(75,24)),' days and ',mod(75,24),' hours')
     
    int(div(75,24)) will get the number of full days as an integer value removing the decimals. mod(75,24) will give you the remaining number of hours. 
    Hope that helps.
     
     
  • LinkeD365 Profile Picture
    105 on 20 Sep 2019 at 12:41:55
    Re: Convert Hours in to Days and hour

    Think you just need to use the mod function

     

    mod(75, 24) gives you 3

     

    https://docs.microsoft.com/en-gb/azure/logic-apps/workflow-definition-language-functions-reference#mod

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 986 Moderator

#2
stampcoin Profile Picture

stampcoin 699 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 577 Super User 2025 Season 2

Loading complete