# Filtering based on time of day and day of week

**URL:** <https://community.glideapps.com/t/filtering-based-on-time-of-day-and-day-of-week/27247>\
**Category:** Ask for Help\
**Created:** [May 26, 2021, 12:00pm UTC](https://community.glideapps.com/t/filtering-based-on-time-of-day-and-day-of-week/27247 "2021-05-26T12:00:49Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mathieu\_Maure](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mathieu_maure/32/23546_2.png) [@Mathieu\_Maure](https://community.glideapps.com/u/Mathieu_Maure)\
**Post date:** [May 26, 2021, 12:00pm UTC](https://community.glideapps.com/t/filtering-based-on-time-of-day-and-day-of-week/27247/1 "2021-05-26T12:00:49Z")

</div>

Hello!  
I would like to show a component only during weekdays (M-F) from 11:00 to 19:00.  
I was thinking of doing the calculations directly in my Gsheet but am worried of refresh times (although it is a PRO app).

How would you tackle this?

Thanks a ton!  
Mathieu

---

<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 26, 2021, 12:19pm UTC](https://community.glideapps.com/t/filtering-based-on-time-of-day-and-day-of-week/27247/2 "2021-05-26T12:19:02Z")

</div>

I’m thinking you can use two columns to address this.

A math column: WEEKDAY(N) with N being the Now value to get the Weekday (1 is Sunday, 2 is Monday, etc.)

A math column: HOUR(N) being the Now value to get the current hour.

Show components when Weekday is not 6 and Weekday is not 7 and Hour is greater than 10 and Hour is less than 20.

---

<div class="post-metadata">

**Author:** ![Mathieu\_Maure](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mathieu_maure/32/23546_2.png) [@Mathieu\_Maure](https://community.glideapps.com/u/Mathieu_Maure)\
**Post date:** [May 26, 2021, 1:09pm UTC](https://community.glideapps.com/t/filtering-based-on-time-of-day-and-day-of-week/27247/3 "2021-05-26T13:09:30Z")

</div>

Magnificent @ThinhDinh, thanks a million  
Does NOW take the user’s timezone? Is it possible to force a timezone?  
The use case is that I only want to let users sell when the financial market is open!

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/e/5/e5ce806bf316ba26e54ea50cb4a3bf04c6c8e9d5.png)

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [May 26, 2021, 1:12pm UTC](https://community.glideapps.com/t/filtering-based-on-time-of-day-and-day-of-week/27247/4 "2021-05-26T13:12:08Z")

</div>

Now() will reflect the local time of the users device. If you want to make adjustments for timezone, then you’d need to first know the users timezone (or GMT offset), and then factor that into the calculations.

---

<div class="post-metadata">

**Author:** ![Mathieu\_Maure](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mathieu_maure/32/23546_2.png) [@Mathieu\_Maure](https://community.glideapps.com/u/Mathieu_Maure)\
**Post date:** [May 26, 2021, 1:34pm UTC](https://community.glideapps.com/t/filtering-based-on-time-of-day-and-day-of-week/27247/5 "2021-05-26T13:34:33Z")

</div>

Very clear, thanks @Darren_Murphy !  
I will assume that they all have their devices set to France then 🙂

Have a great day

---

<div class="post-metadata">

**Author:** ![NoCodeAndy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/nocodeandy/32/62530_2.png) [@NoCodeAndy](https://community.glideapps.com/u/NoCodeAndy)\
**Post date:** [January 17, 2024, 4:52pm UTC](https://community.glideapps.com/t/filtering-based-on-time-of-day-and-day-of-week/27247/6 "2024-01-17T16:52:06Z")

</div>


