• DOCUMENTATION
  • WORKATO BLOG
  • PRODUCT BLOG
  • Return to Workato
  • Log in
  • ☰
  • Solutions Articles
  • Forums/Discussions
  • Submitted Tickets
New Topic
Discussions Recipe Building Formula Mode Questions
S

Scott Talarico

started a topic about 4 years ago
Answered

Date Formula (Weekday vs weekend)

Is there a formula that will take a certain date and schedule an event that is the next business day?  As an example, if a recipe to schedule an event was triggered Saturday I would like it to schedule the event in Quickbase for Monday.  If it was triggered Monday I would like the event to be scheduled for Tuesday.  Basically skipping the weekends.  


Best Answer
A
Allan Teng from Workato said about 4 years ago

This is possible. You will need to use formula mode to do this.


<pill>.wday == 5 ? <pill>.+3.days : <pill>.wday == 6 ? <pill>.+2.days : <pill>.+1.days


More information about formula mode can be found here: https://support.workato.com/solution/articles/1000173152

Answer

Allan Teng from Workato

said about 4 years ago

This is possible. You will need to use formula mode to do this.


<pill>.wday == 5 ? <pill>.+3.days : <pill>.wday == 6 ? <pill>.+2.days : <pill>.+1.days


More information about formula mode can be found here: https://support.workato.com/solution/articles/1000173152

S

Scott Talarico

said about 4 years ago

I'm using a date field (mm/dd/yy) in QuickBase.  I can create a new field that will return day of the week.  Would that be the correct approach or should that conversion be added to the formula?

Allan Teng from Workato

said about 4 years ago

You can do that too. Either way works.

L

Laura Boylan

said over 1 year ago

For anyone else who has been hunting for this solution... this formula worked for me, but only after removing the dots in front of the plus signs in the accepted answer above:


In other words, this did not work for me:


<pill>.wday == 5 ? <pill>.+3.days : <pill>.wday == 6 ? <pill>.+2.days : <pill>.+1.days


This did:

<pill>.wday == 5 ? <pill>+3.days : <pill>.wday == 6 ? <pill>+2.days : <pill>+1.days
Login to post a comment

Still can't find your solution?

Send us a ticket, we will try our best to assist you with your problem

Documentation
Developer's Library
Tutorials
eBooks
Product Hour
Product Blog
Workato Blog
Product updates
Customer Stories
© Workato 2020   Privacy   Terms   +1 (844) 469-6752
  • Documentation
  • Workato Blog
  • Product Blog
  • Solutions
  • Forums
  • Tickets
  • Log in
  • Return to Workato