# Mondays between two dates

**URL:** <https://community.glideapps.com/t/mondays-between-two-dates/61364>\
**Category:** Ask for Help\
**Created:** [May 4, 2023, 8:53pm UTC](https://community.glideapps.com/t/mondays-between-two-dates/61364 "2023-05-04T20:53:04Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Food2Soil](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/food2soil/32/659_2.png) [@Food2Soil](https://community.glideapps.com/u/Food2Soil)\
**Post date:** [May 4, 2023, 8:53pm UTC](https://community.glideapps.com/t/mondays-between-two-dates/61364/1 "2023-05-04T20:53:04Z")

</div>

Hey Gliders,  
I have a google sheet with a list of crops. Each crop has two date columns - Ready for Harvest and End of Harvest.  
I have another glide table called “What’s available” with a column of all Mondays from June through August. So for e.g.  
row 1 - June 5, 2023  
row 2 - June 12, 2023  
and so on…

I want the ‘Whats Available’ glide table to pull all the crops that would be available for harvesting as long as the Monday (e.g. June 5, 2023) falls between the two dates in the crop sheet - Ready to Harvest & End of Harvest.

The way I was hoping to accomplish this was to see if I could get a date array of all Mondays between the ‘Ready to Harvest’ and ‘End of Harvest’ in the crops sheet. Then I would set a date relation between the ‘What’s Available’ table and Crops sheet and then use lookup to get all crops names where the ‘What’s Available’ date falls between the ‘Ready to Harvest’ and ‘End Harvest’. Is there a way to get a date array of all Mondays between two dates? Or perhaps there is a more cleaner way to accomplish this.

Also, I am using classic apps and don’t know how to write scripts.

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![nathanaelb](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/nathanaelb/32/43079_2.png) [@nathanaelb](https://community.glideapps.com/u/nathanaelb)\
**Post date:** [May 4, 2023, 10:09pm UTC](https://community.glideapps.com/t/mondays-between-two-dates/61364/2 "2023-05-04T22:09:50Z")

</div>

Glide is releasing the Query column later this week. I’m not sure, but I think it could help address your request nicely.

> [@new Query column!](https://community.glideapps.com/t/query-column-is-in-staging/61320):
>
> This request has been brought to life. See Mark’s video here.

> [@Conditional Relations](https://community.glideapps.com/t/conditional-relations/13818/23):
>
> Now available as the Query column (you can enable this as a Preview feature on the upper-right side of your dashboard).

---

<div class="post-metadata">

**Author:** ![Food2Soil](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/food2soil/32/659_2.png) [@Food2Soil](https://community.glideapps.com/u/Food2Soil)\
**Post date:** [May 4, 2023, 10:59pm UTC](https://community.glideapps.com/t/mondays-between-two-dates/61364/3 "2023-05-04T22:59:48Z")

</div>

Woah! This must be how it feels to get a wish granted by the geni(us) at Glide! 🙏

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [May 4, 2023, 11:09pm UTC](https://community.glideapps.com/t/mondays-between-two-dates/61364/4 "2023-05-04T23:09:53Z")

</div>

It is a simple JavaScript… i can write it for you

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [May 4, 2023, 11:32pm UTC](https://community.glideapps.com/t/mondays-between-two-dates/61364/5 "2023-05-04T23:32:37Z")

</div>

It’s in production already, you just need to enable it in Previews.

@Food2Soil curious how this turns out for you. If you can share some screenshots of sample data, we can brainstorm together!

---

<div class="post-metadata">

**Author:** ![Food2Soil](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/food2soil/32/659_2.png) [@Food2Soil](https://community.glideapps.com/u/Food2Soil)\
**Post date:** [May 4, 2023, 11:37pm UTC](https://community.glideapps.com/t/mondays-between-two-dates/61364/6 "2023-05-04T23:37:03Z")

</div>

Enabling Query preview and using it in the Harvest Calendar sheet worked for a split second. I could see the results and then it wiped off. Sharing screenshots. Is it a glitch in query or is there something I am doing wrong.

 ![query](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/9/a/9ac4d2fc1f3b8badbd530940a859d593ab7f437e.jpeg)

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [May 4, 2023, 11:39pm UTC](https://community.glideapps.com/t/mondays-between-two-dates/61364/7 "2023-05-04T23:39:39Z")

</div>

That’s weird. Can you refresh the tab and try again? I think you’re quite close to your solution.

---

<div class="post-metadata">

**Author:** ![nathanaelb](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/nathanaelb/32/43079_2.png) [@nathanaelb](https://community.glideapps.com/u/nathanaelb)\
**Post date:** [May 5, 2023, 11:00am UTC](https://community.glideapps.com/t/mondays-between-two-dates/61364/8 "2023-05-05T11:00:36Z")

</div>

I’m not sure, this is typically the type of situation where I would need to tweak with a real example and see the output, but try changing the configuration of your Query Column:

Ready For Harvest is on or **before** _Week_  
And  
End of Harvest is on or **after** _Week_

---

<div class="post-metadata">

**Author:** ![Food2Soil](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/food2soil/32/659_2.png) [@Food2Soil](https://community.glideapps.com/u/Food2Soil)\
**Post date:** [May 5, 2023, 5:55pm UTC](https://community.glideapps.com/t/mondays-between-two-dates/61364/9 "2023-05-05T17:55:46Z")

</div>

it is working now. I just tried a few random things like deleting the glide table and starting over. and then playing with things like ‘before’, ‘on or before’ etc. Those didn’t work. What worked is setting a relation column between the Harvest Calendar (Glide Table) and Crop sheet. and then using the query.  
I am not smart enough to figure out why this worked. So just passing this info along so others can make sense of it.  
Thanks to all of you who chimed in on this.

 ![query1](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/e/f/effa9b10b26965c65dadac863a579f5d939738c4.jpeg)  
 ![query2](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/c/1/c1730e1cb4d02847cfe8467f95361b239be37bf2.jpeg)  
 ![query3](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/2/6/266f5107a7eff685488558668e519ced998ef418.jpeg)

---

<div class="post-metadata">

**Author:** ![nathanaelb](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/nathanaelb/32/43079_2.png) [@nathanaelb](https://community.glideapps.com/u/nathanaelb)\
**Post date:** [May 5, 2023, 6:03pm UTC](https://community.glideapps.com/t/mondays-between-two-dates/61364/10 "2023-05-05T18:03:51Z")

</div>

A Query on the Relation?

Either way, congrats for making it work!
