cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

Convert Minutes to hours and minutes

Hi All,  I have to convert minutes(90.60.120) into hours and remaining minutes. 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Dual Super User III
Dual Super User III

Re: Convert Minutes to hours and minutes

@BKGOUD 

Problem finally solved?

Thanx!



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



View solution in original post

4 REPLIES 4
Highlighted
Dual Super User III
Dual Super User III

Re: Convert Minutes to hours and minutes

Hi!

 

div() and mod() WDL functions should do the magic

More info at 

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

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

 

Hope this helps

 



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Highlighted
Helper II
Helper II

Re: Convert Minutes to hours and minutes

Hi @efialttes,

 

Thanks for helping me.

 

I have built below expression to achieve my requirement but invalid expression. Could you please help on the below code.

 I was expecting result should be: 1H:0M

MeetingDuration: 60Minutes from sharepoint list.

 

concat(div(variables('MeetingDuration')/60,0),':',mod(variables('MeetingDuration'),60) )

Highlighted
Dual Super User III
Dual Super User III

Re: Convert Minutes to hours and minutes

Hi!

Assuming variable 'Meeting Duration' is of type int, I would try the following WDL expression instead:

concat(div(variables('MeetingDuration'),60),':',mod(variables('MeetingDuration'),60))

 

But if your variable 'Meeting Duration' is of type string, I would try the following WDL expression instead:

concat(div(int(variables('MeetingDuration')),60),':',mod(int(variables('MeetingDuration')),60))

 

Not in my laptop, unable to test

 



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Highlighted
Dual Super User III
Dual Super User III

Re: Convert Minutes to hours and minutes

@BKGOUD 

Problem finally solved?

Thanx!



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Users online (7,919)