# List of Dates Between Dates

**URL:** <https://community.glideapps.com/t/list-of-dates-between-dates/54551>\
**Category:** Ask for Help\
**Created:** [November 20, 2022, 6:46am UTC](https://community.glideapps.com/t/list-of-dates-between-dates/54551 "2022-11-20T06:46:25Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Loqode](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/loqode/32/50217_2.png) [@Loqode](https://community.glideapps.com/u/Loqode)\
**Post date:** [November 20, 2022, 6:46am UTC](https://community.glideapps.com/t/list-of-dates-between-dates/54551/1 "2022-11-20T06:46:25Z")

</div>

Hi all!

I’m building a boat syndication app that allows boat shareholders to book days on their boat.

Is there a quick Javascript snippet I can use to create a list of all dates between the Start and End date of the booking?

E.g.

- Start 24th
- End 28th
- List of days between = 25th, 26th, 27th.

I’ve done this without code, but it has added quite a few columns to my table and isn’t really scalable…  
I feel like there’s a short Javascript snippet of code that would solve this for me?

Any help would be much appreciated!

Cheers,  
Marco 🥂

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [November 20, 2022, 6:55am UTC](https://community.glideapps.com/t/list-of-dates-between-dates/54551/2 "2022-11-20T06:55:30Z")

</div>

I would use a Helper Table to dynamically generate the list. Is there a known maximum number of days?

---

<div class="post-metadata">

**Author:** ![Loqode](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/loqode/32/50217_2.png) [@Loqode](https://community.glideapps.com/u/Loqode)\
**Post date:** [November 20, 2022, 7:05am UTC](https://community.glideapps.com/t/list-of-dates-between-dates/54551/3 "2022-11-20T07:05:29Z")

</div>

Thanks for the quick response Darren!

What’s a Helper Table?  
And how would I implement it?

As for the max duration, I don’t expect a single booking to exceed 7 days, but there’s no hard limit so I wanted to build in redundancy incase someone wanted to book 2-3 weeks onboard.

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [November 20, 2022, 7:08am UTC](https://community.glideapps.com/t/list-of-dates-between-dates/54551/4 "2022-11-20T07:08:51Z")

</div>

Gimme 10-15 mins, I’ll make a quick video.

---

<div class="post-metadata">

**Author:** ![Loqode](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/loqode/32/50217_2.png) [@Loqode](https://community.glideapps.com/u/Loqode)\
**Post date:** [November 20, 2022, 7:09am UTC](https://community.glideapps.com/t/list-of-dates-between-dates/54551/5 "2022-11-20T07:09:52Z")

</div>

Legend, much appreciated!

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [November 20, 2022, 7:15am UTC](https://community.glideapps.com/t/list-of-dates-between-dates/54551/6 "2022-11-20T07:15:47Z")

</div>

Here you go…

Also, just to answer this question…

> [@Loqode](#):
>
> What’s a Helper Table?

Have a read of the below thread:

> [@How would you describe a helper table?](https://community.glideapps.com/t/how-would-you-describe-a-helper-table/54497):
>
> Hi all, ‘helper table’ seems a way to get things done with Glide as ‘invented’ by users. I don’t think I find it in any official Glide docs. How would you describe a ‘helper table’ and in what cases would you use it and how? Maybe this post + reactions can make it to the help section afterward wink

---

<div class="post-metadata">

**Author:** ![Loqode](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/loqode/32/50217_2.png) [@Loqode](https://community.glideapps.com/u/Loqode)\
**Post date:** [November 20, 2022, 7:24am UTC](https://community.glideapps.com/t/list-of-dates-between-dates/54551/7 "2022-11-20T07:24:35Z")

</div>

Very clear explanation Darren, appreciate you taking the time to explain.

I’ll experiment now and see how I go, seems like a solid alternative to my column overload 👍

---

<div class="post-metadata">

**Author:** ![Loqode](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/loqode/32/50217_2.png) [@Loqode](https://community.glideapps.com/u/Loqode)\
**Post date:** [November 20, 2022, 7:44am UTC](https://community.glideapps.com/t/list-of-dates-between-dates/54551/8 "2022-11-20T07:44:24Z")

</div>

Hi Darren, looks like your solution works quite well for my use-case.

Since the Start and End dates are user-specific columns on another form, I was able to simplify your solution even further by replacing the user-specific Start & End dates in the Helper table with a Single Value column that pulls from the form itself… If that makes sense? 😅

Anyhow, thanks your help!

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [November 20, 2022, 7:50am UTC](https://community.glideapps.com/t/list-of-dates-between-dates/54551/9 "2022-11-20T07:50:34Z")

</div>

> [@Loqode](#):
>
> I was able to simplify your solution even further by replacing the user-specific Start & End dates in the Helper table with a Single Value column that pulls from the form itself… If that makes sense?

Yep, that makes perfect sense. I was just giving you a self-contained example.

Also, you’ve probably also figured out that the first 3 columns aren’t strictly necessary. You could replace those 3 with a single Number type column, and number the rows manually. I just do it the way I showed in the video out of habit. I also think it’s a bit more elegant 🙂

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)\
**Post date:** [November 21, 2022, 7:51am UTC](https://community.glideapps.com/t/list-of-dates-between-dates/54551/10 "2022-11-21T07:51:14Z")

</div>

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