cancel
Showing results for
Did you mean:
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

## Re: Convert Hours in to Days and hour

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.

Proud to be a Flownaut!

2 REPLIES 2
Highlighted
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

## Re: Convert Hours in to Days and hour

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.

Proud to be a Flownaut!

Announcements

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

#### Watch Sessions On Demand!

Continue your learning in our online communities.

#### Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

#### Flow Community User Group Member Badge

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

#### Microsoft Learn

Learn how to build the business apps that you need.

#### Power Platform World Tour

Find out where you can attend!

#### Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 387 members 5,882 guests
Recent signins: