# Query data using two date columns

**URL:** <https://community.glideapps.com/t/query-data-using-two-date-columns/68859>\
**Category:** Ask for Help\
**Created:** [December 19, 2023, 11:44pm UTC](https://community.glideapps.com/t/query-data-using-two-date-columns/68859 "2023-12-19T23:44:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hassan\_Nadeem](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/hassan_nadeem/32/72956_2.png) [@Hassan\_Nadeem](https://community.glideapps.com/u/Hassan_Nadeem)\
**Post date:** [December 19, 2023, 11:44pm UTC](https://community.glideapps.com/t/query-data-using-two-date-columns/68859/1 "2023-12-19T23:44:29Z")

</div>

Hi,

I have a table to store weekly records. In there, I have two columns “Date From” and “Date To”

I need to create a dashboard where user puts in a Date Range and it takes both the “Date From” and “Date to” column into account,

If it was just one date column then I could have easily done a query and filter but how do I take 2 date columns into account?

Attaching screenshots for better understanding.

 ![Week Table](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/b/4/b4281b34835e8016edc6ce4fe678635f4cd68cba.png)

 ![Sales-Track-·-Glide](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/9/2/9251f89a682e5a94ad3011cd992ada7af1c9bcc5.png)

---

<div class="post-metadata">

**Author:** ![Hassan\_Nadeem](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/hassan_nadeem/32/72956_2.png) [@Hassan\_Nadeem](https://community.glideapps.com/u/Hassan_Nadeem)\
**Post date:** [December 19, 2023, 11:47pm UTC](https://community.glideapps.com/t/query-data-using-two-date-columns/68859/2 "2023-12-19T23:47:34Z")

</div>

On the second screenshot, if I query for lets say 26th December to 29th December,

then it should return the 2nd and 3rd row as those week dates fall under the date range I selected.

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [December 20, 2023, 12:17am UTC](https://community.glideapps.com/t/query-data-using-two-date-columns/68859/3 "2023-12-20T00:17:27Z")

</div>

Just off the top of my head, but something like this might work in a Query:  
EntryFrom \<= DateTo  
AND  
EntryTo \>= DateFrom

---

<div class="post-metadata">

**Author:** ![Hassan\_Nadeem](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/hassan_nadeem/32/72956_2.png) [@Hassan\_Nadeem](https://community.glideapps.com/u/Hassan_Nadeem)\
**Post date:** [December 20, 2023, 12:48am UTC](https://community.glideapps.com/t/query-data-using-two-date-columns/68859/4 "2023-12-20T00:48:36Z")

</div>

That was so easy! Thank you 🤩

---

<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:** [December 27, 2023, 12:49am UTC](https://community.glideapps.com/t/query-data-using-two-date-columns/68859/5 "2023-12-27T00:49:28Z")

</div>

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