# Query Data that is within a week, month and day from now

**URL:** https://community.glideapps.com/t/query-data-that-is-within-a-week-month-and-day-from-now/74694
**Category:** Ask for Help
**Tags:** date-math
**Created:** [July 8, 2024, 10:38am UTC](https://community.glideapps.com/t/query-data-that-is-within-a-week-month-and-day-from-now/74694 "2024-07-08T10:38:42Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Hive\_Admin](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/hive_admin/32/66390_2.png) [@Hive\_Admin](https://community.glideapps.com/u/Hive_Admin)
#### Post date: [July 8, 2024, 10:38am UTC](https://community.glideapps.com/t/query-data-that-is-within-a-week-month-and-day-from-now/74694/1 "2024-07-08T10:38:42Z")

</div>

Hi guys,

Ive seen some video’s on date filtering but essentially just want to be able to have the following :

I have a table called closed jobs and there is a closed date value in it. I have another Table called Admin Dashboard where I want to query all the closed jobs Today, This Week and This Month. In the closed jobs table I think it would be easiest in the context of the app to use this formula -

to return 0 if it is within the week. If it is 0 with a if statement column I can then say if 0 true if not false. And then query the the ‘true’ jobs and then do the same for the day and the months.

However, When I put this formula in I get this :

 ![Screenshot 2024-07-08 at 12.37.08](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/c/b/cb7ab8de6c9424a17284a25350c2e395230a8b85.png)

So not sure why its not returning 0. Would appreciate any help on this as its pretty urgent as well as just helping out on what the formula for a day and a month would be using the same logic!

Thanks a lot guys!

Regards,

Mitch

---

<div class="post-metadata">

### Author: ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)
#### Post date: [July 8, 2024, 5:47pm UTC](https://community.glideapps.com/t/query-data-that-is-within-a-week-month-and-day-from-now/74694/2 "2024-07-08T17:47:15Z")

</div>

Were mine any of the videos you’ve already watched?

[![](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/2/8/28d5068b6f9bb5ce56f7485614bc352a4167f83a.jpeg "Glide: Dynamically Filter your Data by TIMEFRAMES (Part 1)") ](https://www.youtube.com/watch?v=pApLeMYHFzE)

If you need the filter to also calculate big numbers, then you’ll have to use a custom filter like I explained the video. If you’re just looking to filter a collection, then you can probably get away with using Glide’s native in-app filters with a combination of if Else columns and math column.

---

<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: [July 8, 2024, 7:23pm UTC](https://community.glideapps.com/t/query-data-that-is-within-a-week-month-and-day-from-now/74694/3 "2024-07-08T19:23:51Z")

</div>

What’s the formula?
