# How do I make a button visible only during certain hours of the day?

**URL:** <https://community.glideapps.com/t/how-do-i-make-a-button-visible-only-during-certain-hours-of-the-day/25229>\
**Category:** Ask for Help\
**Created:** [April 6, 2021, 11:30pm UTC](https://community.glideapps.com/t/how-do-i-make-a-button-visible-only-during-certain-hours-of-the-day/25229 "2021-04-06T23:30:29Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joseph\_Ucuzoglu](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/joseph_ucuzoglu/32/13_2.png) [@Joseph\_Ucuzoglu](https://community.glideapps.com/u/Joseph_Ucuzoglu)\
**Post date:** [April 6, 2021, 11:30pm UTC](https://community.glideapps.com/t/how-do-i-make-a-button-visible-only-during-certain-hours-of-the-day/25229/1 "2021-04-06T23:30:29Z")

</div>

I am working on a Covid-19 tracking app for a school and they need to make sure that they collect their information per CDC guidelines 2 hours or less before school opens.

My App currently has a button that allows them to enter information and I think the easiest way to facilitate this would be to have the button only visible starting from a certain time. What is the best way to introduce a visibility condition to hide the button when it does not fall within a selected time frame during the day?

---

<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:** [April 6, 2021, 11:42pm UTC](https://community.glideapps.com/t/how-do-i-make-a-button-visible-only-during-certain-hours-of-the-day/25229/2 "2021-04-06T23:42:04Z")

</div>

Could get a bit creative…Create a math column in the data editor to add the hour and minutes of the current time (`hour(now)*100+minutes(now)`). This would result in something like `730` for 7:30 or `1105` for 11:05.

Then, only show the button when that value falls within the range you’re looking for. for example, "Show when [math column] is greater than `530`  
AND  
show when [math column] is less than `730`"

if you only wanted to show the button between 5:30 and 7:30 am.

---

<div class="post-metadata">

**Author:** ![Joseph\_Ucuzoglu](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/joseph_ucuzoglu/32/13_2.png) [@Joseph\_Ucuzoglu](https://community.glideapps.com/u/Joseph_Ucuzoglu)\
**Post date:** [April 7, 2021, 12:02am UTC](https://community.glideapps.com/t/how-do-i-make-a-button-visible-only-during-certain-hours-of-the-day/25229/3 "2021-04-07T00:02:30Z")

</div>

> [@Robert\_Petitto](#):
>
> ( `hour(now)*100+minutes(now)` )

Wonderful solution to use the math column. I did it and only needed to grab the current hour given I don’t need that much precision.

Do you know if the time is localized to the location of the user that is logged in or localized to the spreadsheet that serves as the data source?

---

<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:** [April 7, 2021, 12:04am UTC](https://community.glideapps.com/t/how-do-i-make-a-button-visible-only-during-certain-hours-of-the-day/25229/4 "2021-04-07T00:04:22Z")

</div>

> [@Joseph\_Ucuzoglu](#):
>
> Do you know if the time is localized to the location of the user that is logged in or localized to the spreadsheet that serves as the data source?

I always forget the answer to this question. My gut tells me local.

---

<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:** [April 11, 2021, 7:27pm UTC](https://community.glideapps.com/t/how-do-i-make-a-button-visible-only-during-certain-hours-of-the-day/25229/5 "2021-04-11T19:27:48Z")

</div>

Time is localized to the user. Any column that’s not a basic column (so any computed column) is computed directly on the user’s device. This includes any date calculations that use ‘Now’, so it will always be the local user’s time.

---

<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/how-do-i-make-a-button-visible-only-during-certain-hours-of-the-day/25229/6 "2024-01-17T16:52:39Z")

</div>


