List All Dates Between Start And End Date

I Need A Way To List All Dates Between Start Date And End Date To Eliminate Double Booking Someone For The Same Spot During That Time

Anyone Know How To Do This

I would do it like this (I don’t like working directly with dates in JS, I want to convert it to numbers first).

  • Create a column like this in a helper table, writing “1st January 1970” to the first cell.

image

  • Cast that to your Users table with a Single Value column.

image

  • Go to your bookings table, do this.

return Array.from(
    { length: p2 - p1 + 1 },
    (_, i) => p1 + i
  ).join(', ');

Then, when there’s a new booking, you also convert it to this “difference” format and check against the existing list of numbers to prevent double booking.

2 Likes

I have a template called Simple 1 Person Booking Solution that you can start with.

This Helps So Much,Thank You

1 Like