How to split an item into 2 items with different dates when months overlap with Integromat?

Hey there!
I am trying to create an automation with Integromat that will split 1 incoming form submission into 2 items, if the start date and the end date of the request are overlapping months.
Ex.: an employee requests vacation from 29.12 - 04.01. When the request lands in the Monday board, I need 2 identical but separate items, with the only difference of the dates:

  1. Vacation dates: 29.12 - 31.12
  2. Vacation dates: 01.01 - 04.01

I know there should be a filter in the likes of: IF the months don‘t match, THEN create 2 items or create an item and update the other items column value but the exact functions and formulas are a bit messy.
Hope it‘s clear…
Any clues how to do it with Integromat? Thanks a lot!

@Daria1

Sounds like you have the basics. Here are the details you are asking for:

End of start_date month: addDays(addMonths(setDate(start_date; 1); 1); -1)
Start of end_date month: setDate(end_date; 1)
Filter: formatDate(start_date; M) [NOT EQUAL TO] formatDate(end_date; M)

Let me know if you need more.

Jim - Subscribe to The Monday Man
Watch Our Latest Video: A Killer Combo: monday.com, Integromat & Google Sheets - Recurring Tasks Example

Perfect! Thanks for the input @JCorrell ! Works like a charm.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.