• Documentation
  • Workato Blog
  • Product Blog
  • Return to Workato
  • Login
  • Automation Institute
  • Documentation
  • Community Forums
New Topic
Discussions Recipe Building Formula Mode Questions
C

Chris Read

started a topic about 4 years ago

Number of Months between two dates

I see this recipe for calculating the number of days between two months...

https://www.workato.com/recipes/907899-calculate-number-of-days-between-two-dates#recipe

How would I get the same thing but number of months instead?

K

Kevin Yu

said about 4 years ago

It depends on what is your definition of months.

You can refer to this recipe https://www.workato.com/recipes/944768-calculate-number-of-days-between-two-dates

Steps 4-7 are examples of calculations of number of months.

The last step gives you the number of months and days.

M

Martin Pain

said about 2 years ago

Kevin, do you have a current link to a recipe that shows these examples? The link in the previous post is now broken.


Thanks

M

Martin Pain

said about 2 years ago

This formula works for me, to calculate the number of "months or part thereof":

 

([end date pill].month - [start date pill].month) + 12 * ([end date pill].year - [start date pill].year)


 Where [end date pill] is the pill of the end (later) date, and [start date pill] is the pill of the start (earlier) date.

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 2022   Privacy   Terms   +1 (844) 469-6752
  • Documentation
  • Workato Blog
  • Product Blog
  • Solutions
  • Forums
  • Tickets
  • Log in
  • Return to Workato
Topic views count