cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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.
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))))
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.
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 Flow Community Manager
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))))

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!

Top Kudoed Authors
Users Online
Currently online: 365 members 4,320 guests
Please welcome our newest community members: