# Calculating This Week in GDE

**URL:** https://community.glideapps.com/t/calculating-this-week-in-gde/19075
**Category:** Ask for Help
**Created:** [November 28, 2020, 8:02pm UTC](https://community.glideapps.com/t/calculating-this-week-in-gde/19075 "2020-11-28T20:02:42Z")
**Posts on this page:** 10
**Page:** 2

<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: [November 28, 2020, 11:45pm UTC](https://community.glideapps.com/t/calculating-this-week-in-gde/19075/21 "2020-11-28T23:45:17Z")

</div>

Not sure if it’s better than your approach, but I usually have a time sheet specifically for cases like this. I have a start week date and end week date with multiple weeks filled in advance, then an arrayformula to determine if the row is “current week”, all in the sheet.

Then in Glide, I use lookup and relation to bring over the current week’s start and end dates. If the timestamp is before start of the current week or after end of the current week then False, else True.

---

<div class="post-metadata">

### Author: ![Errcomp](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/errcomp/32/13195_2.png) [@Errcomp](https://community.glideapps.com/u/Errcomp)
#### Post date: [November 28, 2020, 11:51pm UTC](https://community.glideapps.com/t/calculating-this-week-in-gde/19075/22 "2020-11-28T23:51:38Z")

</div>

That’s a neat idea! Does this use a Today() formula, and if so how do you get Glide to update at midnight? For me, sometimes it does, sometimes not…that’s why I’m trying to get it all in GDE.

---

<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: [November 28, 2020, 11:53pm UTC](https://community.glideapps.com/t/calculating-this-week-in-gde/19075/23 "2020-11-28T23:53:25Z")

</div>

I would go with what Joe suggested to you above, use a script to insert some random value somewhere in your sheet. That will force an update, I can confirm.

---

<div class="post-metadata">

### Author: ![Drearystate](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/drearystate/32/49605_2.png) [@Drearystate](https://community.glideapps.com/u/Drearystate)
#### Post date: [November 28, 2020, 11:54pm UTC](https://community.glideapps.com/t/calculating-this-week-in-gde/19075/24 "2020-11-28T23:54:15Z")

</div>

Thanks Thinh, I will say it has always been a tried and true result for me but Thinh’s idea sounds interesting and may be faster.

---

<div class="post-metadata">

### Author: ![Errcomp](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/errcomp/32/13195_2.png) [@Errcomp](https://community.glideapps.com/u/Errcomp)
#### Post date: [November 28, 2020, 11:56pm UTC](https://community.glideapps.com/t/calculating-this-week-in-gde/19075/25 "2020-11-28T23:56:22Z")

</div>

Yes, I will definitely do that if this GDE method doesn’t cover all the bases (reduce delay, update at midnight). Will update once I test at midnight 🙂

---

<div class="post-metadata">

### Author: ![Errcomp](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/errcomp/32/13195_2.png) [@Errcomp](https://community.glideapps.com/u/Errcomp)
#### Post date: [December 1, 2020, 11:55pm UTC](https://community.glideapps.com/t/calculating-this-week-in-gde/19075/26 "2020-12-01T23:55:47Z")

</div>

This method worked, but I would have to do this across my entire app. I realized I’m triggering a script to write data to the file every night anyways, so that should update the google sheet around midnight.

---

<div class="post-metadata">

### Author: ![Drearystate](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/drearystate/32/49605_2.png) [@Drearystate](https://community.glideapps.com/u/Drearystate)
#### Post date: [December 3, 2020, 3:49am UTC](https://community.glideapps.com/t/calculating-this-week-in-gde/19075/27 "2020-12-03T03:49:20Z")

</div>

yes, yes it should.

---

<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 4, 2020, 3:38pm UTC](https://community.glideapps.com/t/calculating-this-week-in-gde/19075/28 "2020-12-04T15:38:54Z")

</div>

Now you should be able to create a math column and calculate weeknum(today) - weeknum(date) and if it’s zero, then it’s ‘this week’. All within Glide. No google sheet formulas or scripts.

> [@date MORE Date Math incl. Weeknum!](https://community.glideapps.com/t/more-date-math-incl-weeknum/19386):
>
> Huge win! Been asking for Weeknum for months—thanks @Mark and the rest of the Glide team!

---

<div class="post-metadata">

### Author: ![Errcomp](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/errcomp/32/13195_2.png) [@Errcomp](https://community.glideapps.com/u/Errcomp)
#### Post date: [December 6, 2020, 12:29am UTC](https://community.glideapps.com/t/calculating-this-week-in-gde/19075/29 "2020-12-06T00:29:00Z")

</div>

Oh wow, I didn’t know they released weeknum! Very exciting!

---

<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 6, 2020, 1:53am UTC](https://community.glideapps.com/t/calculating-this-week-in-gde/19075/30 "2020-12-06T01:53:06Z")

</div>

I’m guessing they added it especially for you! 😉

[Previous page](https://community.glideapps.com/t/calculating-this-week-in-gde/19075.md?page=1)
