cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
rtlane
Level: Power Up

Take current time and round up to nearest quarter hour

I need help with a flow app. I want to be able to take the current time, round that time up to the nearest quarter hour and then add 7 minutes to that time.  Then I want to delay the rest of my flow until that time comes. For example: Current time is 15:18, I want it to round up to 15:30 and then add 7 minutes to make it 15:37.  I then want to delay the rest of my flow until that time. 

 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Community Support Team
Community Support Team

Re: Take current time and round up to nearest quarter hour

Hi @rtlane,

 

I am afraid that there is no round function can be used in flow currently, you may consider submitting a request on Flow Ideas forum for this function:

https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas

 

Besides, you may try to use the function if to return the value you want according to the existing time. Please take this doc for more details about the function:

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

 

 

Best regards,

Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

rtlane
Level: Power Up

Re: Take current time and round up to nearest quarter hour

Thank you! I ended using a combo of if statements to accomplish this.

 

if(lessOrEquals(variables('Minutes'),15),add(sub(15,variables('Minutes')),7),if(and(greater(variables('Minutes'),15),lessOrEquals(variables('Minutes'),30)),add(sub(30,variables('Minutes')),7),if(and(greater(variables('Minutes'),30),lessOrEquals(variables('Minutes'),45)),add(sub(45,variables('Minutes')),7),if(greater(variables('Minutes'),45),add(sub(60,variables('Minutes')),7),0))))

View solution in original post

3 REPLIES 3
Community Support Team
Community Support Team

Re: Take current time and round up to nearest quarter hour

Hi @rtlane,

 

I am afraid that there is no round function can be used in flow currently, you may consider submitting a request on Flow Ideas forum for this function:

https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas

 

Besides, you may try to use the function if to return the value you want according to the existing time. Please take this doc for more details about the function:

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

 

 

Best regards,

Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Administrator
Administrator

Re: Take current time and round up to nearest quarter hour

Hello, @rtlane!

 

If you have already posted your idea to the Flow Community Ideas Forum then you need to post the URL to your idea’s thread as a reply to this thread and then "Accept as Solution" on that reply so other users may vote for your Flow Idea and identify the information easily.

 

Thank You!

 

-Gabriel
Flow Community Manager

-Gabriel
Microsoft Power Automate Community Manager
Are YOU a member of your local Power Automate User Group?
Fill out This Form to claim your Community User Group Member Badge!
rtlane
Level: Power Up

Re: Take current time and round up to nearest quarter hour

Thank you! I ended using a combo of if statements to accomplish this.

 

if(lessOrEquals(variables('Minutes'),15),add(sub(15,variables('Minutes')),7),if(and(greater(variables('Minutes'),15),lessOrEquals(variables('Minutes'),30)),add(sub(30,variables('Minutes')),7),if(and(greater(variables('Minutes'),30),lessOrEquals(variables('Minutes'),45)),add(sub(45,variables('Minutes')),7),if(greater(variables('Minutes'),45),add(sub(60,variables('Minutes')),7),0))))

View solution in original post

Helpful resources

Announcements
firstImage

Power Platform Online Conference

Speakers, submit your sessions now! Call for speakers ends Feb. 10!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

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 Power Automate Community Video Gallery!

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (5,394)