cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
azeesdinu
Level: Powered On

Convert Hours in to Days and hour

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

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

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.
 
 

Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


2 REPLIES 2
Highlighted
LinkeD365
Level: Powered On

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#m...

Super User
Super User

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.
 
 

Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Users Online
Currently online: 387 members 5,882 guests
Please welcome our newest community members: