How to Compare Array Data in Two Different Positions

I have two arrays containing dates in the form MM/DD/YYYY.

Let’s say…

Start =
{01/17/2025, 02/07/2025, 02/28/2025, 03/21/2025}

Finish =
{01/31/2025, 02/21/2025, 03/14/2025, 04/04/2025}

I would like to check to iterate through and see if the next start date (e.g. Start[ i + 1]) is before the current finish date (e.g. Finish[i]). Having a lot of trouble figuring out how to compare different data in different positions of the array and iterating through the info. Feel like this should be super simple but totally stumped here.

Hi @Jon_F .

First, we could use slice function at the iterator to extract the selected dates of the first array:

Then, we could use a filter to compare the dates with the second array:

2 Likes

Hi!
Welcome to the Make Community.

To be honest, I’m not sure if I fully understood your needs and if this is exactly what you’re looking for – but I hope it helps.

Please find the attached blueprint.

startDate_endDate_simplymation.json (11.4 KB)

Thank you! This splice function works to remove the first date in Start array, shifting all other dates one position up. Then it’s comparing apples between the two arrays.

This is close but the issue is it appears to still be comparing the same relative positions of each array. My biggest hangup was comparing Start [i+1] to Finish [i]. Shornalatha’s solution of slicing the first entry out of Start works.