# Check data added within this week

**URL:** <https://community.glideapps.com/t/check-data-added-within-this-week/39877>\
**Category:** Ask for Help\
**Created:** [March 20, 2022, 6:00pm UTC](https://community.glideapps.com/t/check-data-added-within-this-week/39877 "2022-03-20T18:00:14Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alvis\_Lo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/alvis_lo/32/40398_2.png) [@Alvis\_Lo](https://community.glideapps.com/u/Alvis_Lo)\
**Post date:** [March 20, 2022, 6:00pm UTC](https://community.glideapps.com/t/check-data-added-within-this-week/39877/1 "2022-03-20T18:00:14Z")

</div>

I’m a new user I glide, can I check the data which is added within this week?  
When i use related date for checking, it shows 6 days or 1 weeks, so that i can’t use the if condition to count. Can anyone help me? Thanks

---

<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:** [March 20, 2022, 6:12pm UTC](https://community.glideapps.com/t/check-data-added-within-this-week/39877/2 "2022-03-20T18:12:00Z")

</div>

This requires you to first create an if then else column where the data resides checking to see if the date is within the week. If so, the if then else column should result in the value you were originally using to make the relation.

To check if the date is within the week:

1. Create a math column with this formula:  
`year(now)*100+weeknum(now)-year(date)*100+weeknum(date)`  
replace `now` with the `Now` value and the `date` value with the timestamp of the data.
2. This should result in `0` if the timestamp is within the week.
3. The if then else column should check if the math column is `0`

---

<div class="post-metadata">

**Author:** ![Alvis\_Lo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/alvis_lo/32/40398_2.png) [@Alvis\_Lo](https://community.glideapps.com/u/Alvis_Lo)\
**Post date:** [March 20, 2022, 6:25pm UTC](https://community.glideapps.com/t/check-data-added-within-this-week/39877/3 "2022-03-20T18:25:57Z")

</div>

If the date column is just a type in data, the result also be as 0?  
I followed the step you given, the result in math column is 2x. I think I can’t say it clear, I have an example, I type a date “2022-03-08”, I got the result in Math column is “24”.

---

<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:** [March 20, 2022, 10:24pm UTC](https://community.glideapps.com/t/check-data-added-within-this-week/39877/4 "2022-03-20T22:24:21Z")

</div>

This is just a math order of operations issue (PEMDAS). You just need to add a couple sets of parenthesis to make it work correctly. This should work:

`(year(now)*100+weeknum(now))-(year(date)*100+weeknum(date))`

---

<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:** [March 20, 2022, 10:35pm UTC](https://community.glideapps.com/t/check-data-added-within-this-week/39877/5 "2022-03-20T22:35:44Z")

</div>

Parenthesis. Of course 🙂

---

<div class="post-metadata">

**Author:** ![Alvis\_Lo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/alvis_lo/32/40398_2.png) [@Alvis\_Lo](https://community.glideapps.com/u/Alvis_Lo)\
**Post date:** [March 21, 2022, 1:09am UTC](https://community.glideapps.com/t/check-data-added-within-this-week/39877/6 "2022-03-21T01:09:27Z")

</div>

Thanks for your great help🙏

---

<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:** [March 22, 2022, 1:10am UTC](https://community.glideapps.com/t/check-data-added-within-this-week/39877/7 "2022-03-22T01:10:23Z")

</div>

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