cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

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
Highlighted
Community Support
Community Support

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

Highlighted
New Member

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
Highlighted
Community Support
Community Support

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

Highlighted
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!
Highlighted
New Member

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

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

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!

Top Solution Authors
Top Kudoed Authors
Users online (4,603)