# Opening and closing hours of a store

**URL:** https://community.glideapps.com/t/opening-and-closing-hours-of-a-store/38351
**Category:** Ask for Help
**Created:** [February 10, 2022, 9:10pm UTC](https://community.glideapps.com/t/opening-and-closing-hours-of-a-store/38351 "2022-02-10T21:10:09Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![scorpio](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/scorpio/32/38799_2.png) [@scorpio](https://community.glideapps.com/u/scorpio)
#### Post date: [February 10, 2022, 9:10pm UTC](https://community.glideapps.com/t/opening-and-closing-hours-of-a-store/38351/1 "2022-02-10T21:10:09Z")

</div>

Could someone help me on how to make the premises appear open or closed if the hours are from Monday to Friday 9:00 a.m. to 3:00 p.m. and 5:00 p.m. to 9:00 p.m. Sunday CLOSED

Thanks

---

<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: [February 10, 2022, 9:13pm UTC](https://community.glideapps.com/t/opening-and-closing-hours-of-a-store/38351/2 "2022-02-10T21:13:17Z")

</div>

Does this need to be dynamic for multiple different businesses, or is this specificly for one business with those specific hours? Are there any Saturday hours?

---

<div class="post-metadata">

### Author: ![scorpio](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/scorpio/32/38799_2.png) [@scorpio](https://community.glideapps.com/u/scorpio)
#### Post date: [February 11, 2022, 9:09pm UTC](https://community.glideapps.com/t/opening-and-closing-hours-of-a-store/38351/3 "2022-02-11T21:09:05Z")

</div>

## yes, it is only for a business. the time is

## Monday to Friday 9:00 a.m. to 15:00 p.m. and 17:00 p.m. to 21:00 p.m.

## Saturday 9:00 a.m. to 15:00 p.m.

## Sunday Closed

if you see from Monday to Friday from 15:00 to 17:00 it is closed  
and on saturday from 15:00 it is closed  
Sunday is closed all day.

Thanks

---

<div class="post-metadata">

### Author: ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)
#### Post date: [February 11, 2022, 10:42pm UTC](https://community.glideapps.com/t/opening-and-closing-hours-of-a-store/38351/4 "2022-02-11T22:42:05Z")

</div>

> **[Business hours & QR DEMO](https://business-hours-demo.glideapp.io/)**
>
> adjust business operating hours, blockout dates, check if business is open now, QR vCard for easy adding to contacts.

---

<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: [February 11, 2022, 11:49pm UTC](https://community.glideapps.com/t/opening-and-closing-hours-of-a-store/38351/5 "2022-02-11T23:49:44Z")

</div>

There’s several ways to handle this depending on how flexible you need it to be, or if the days and times would ever change. What I show below is maintainable, but may take a little bit to fully understand it and how the IF column works. But in it’s simplest (least amount of columns) form, I would do it like this. It could be changed to make it easier to understand, but it would take a few more columns to build it out.

- First I would create a math column to figure out the current weekday number:  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/7/8/78d5477b5ed3c2ac308d1b08e3056cadb7a3ce5b.png)
- Next I would create another math column to figure out the current hour:  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/0/8/080c7dbffa6dfd155faacefed2418650e713742b.png)
- Finally I would create an IF column to use those values to determine if the business is open or closed. Keep in mind that this is based on the current date and time of the current user’s local timezone:
  - What I do here is first check if the weekday is 1 (meaning Sunday), then return Closed.
  - Next I check if the hour is before 9:00, then return Closed so we eliminate any hours less than 9.
  - Next I check if the hour is on or after 21:00, then return Closed so we eliminate any hours greater than or equal to 21.
  - Next I check if the hour is before 15:00, then return Open since any remaining unchecked hours prior to 15:00 on Monday through Saturday are Open.
  - Next I check if the weekday is 7 (meaning Saturday), then return Closed because the only hours left to check are between 15 and 21 and Saturday is closed during that time.
  - Finally I check if the hour is on or after 17:00, then return Open because all that’s left to check are the times between 17 and 21 on Monday through Friday.
  - Anything between 15:00 and 17:00 will fall into the ELSE and return Closed.  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/b/b/bba21964a2c1335f1ab540177cce3040f7472867.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: [February 12, 2022, 1:44am UTC](https://community.glideapps.com/t/opening-and-closing-hours-of-a-store/38351/6 "2022-02-12T01:44:20Z")

</div>

> [@Jeff\_Hager](#):
>
> - What I do here is first check if the weekday is 1 (meaning Sunday), then return Closed.
> - Next I check if the hour is before 9:00, then return Closed so we eliminate any hours less than 9.
> - Next I check if the hour is on or after 21:00, then return Closed so we eliminate any hours greater than or equal to 21.
> - Next I check if the hour is before 15:00, then return Open since any remaining unchecked hours prior to 15:00 on Monday through Saturday are Open.
> - Next I check if the weekday is 7 (meaning Saturday), then return Closed because the only hours left to check are between 15 and 21 and Saturday is closed during that time.
> - Finally I check if the hour is on or after 17:00, then return Open because all that’s left to check are the times between 17 and 21 on Monday through Friday.
> - Anything between 15:00 and 17:00 will fall into the ELSE and return Closed.

What an excellent example of the “working backwards” approach. Superb! 👏

---

<div class="post-metadata">

### Author: ![scorpio](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/scorpio/32/38799_2.png) [@scorpio](https://community.glideapps.com/u/scorpio)
#### Post date: [February 13, 2022, 12:48am UTC](https://community.glideapps.com/t/opening-and-closing-hours-of-a-store/38351/7 "2022-02-13T00:48:58Z")

</div>

Thanks a lot. for your great help but I have a problem I don’t know if it’s because I live in Spain but it tells me that the week is 1 and I should put it as 7 since right now it’s Sunday  
I show you capture

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

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/0/9/091616100e979e5907b182ae931ed2a036aa1617.png)

I do not know what I do badly

Here I leave you how I put it and thank you very much

> **[Open or Closed](https://openorclosed.glideapp.io/)**

---

<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: [February 13, 2022, 1:22am UTC](https://community.glideapps.com/t/opening-and-closing-hours-of-a-store/38351/8 "2022-02-13T01:22:30Z")

</div>

I think it’s the default behaviour of the WEEKDAY function. Sunday = 1, Monday = 2, Tuesday = 3 etc.

---

<div class="post-metadata">

### Author: ![scorpio](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/scorpio/32/38799_2.png) [@scorpio](https://community.glideapps.com/u/scorpio)
#### Post date: [February 13, 2022, 1:42am UTC](https://community.glideapps.com/t/opening-and-closing-hours-of-a-store/38351/9 "2022-02-13T01:42:38Z")

</div>

Ok Thank

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/c/b/cbbee888aa37a2fa9a52c951b371228ac1b8f282.jpeg)

---

<div class="post-metadata">

### Author: ![scorpio](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/scorpio/32/38799_2.png) [@scorpio](https://community.glideapps.com/u/scorpio)
#### Post date: [February 13, 2022, 9:57am UTC](https://community.glideapps.com/t/opening-and-closing-hours-of-a-store/38351/10 "2022-02-13T09:57:44Z")

</div>

Good morning open sale today Sunday classes should go out

---

<div class="post-metadata">

### Author: ![Mark\_Turrell](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mark_turrell/32/26605_2.png) [@Mark\_Turrell](https://community.glideapps.com/u/Mark_Turrell)
#### Post date: [February 13, 2022, 10:21am UTC](https://community.glideapps.com/t/opening-and-closing-hours-of-a-store/38351/11 "2022-02-13T10:21:00Z")

</div>

This depends on your audience and their time zone. I gave up on using Glide to manage on-off times, so I moved to Integromat to push a ‘is-closed’ value on a scheduled basis to the app. I could not reliably use Glide time… as every device things it has the ‘correct time’ for math, etc.

---

<div class="post-metadata">

### Author: ![scorpio](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/scorpio/32/38799_2.png) [@scorpio](https://community.glideapps.com/u/scorpio)
#### Post date: [February 13, 2022, 12:06pm UTC](https://community.glideapps.com/t/opening-and-closing-hours-of-a-store/38351/12 "2022-02-13T12:06:50Z")

</div>

Hello Mark\_Turrell,  
How is Integromat?

---

<div class="post-metadata">

### Author: ![Mark\_Turrell](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mark_turrell/32/26605_2.png) [@Mark\_Turrell](https://community.glideapps.com/u/Mark_Turrell)
#### Post date: [February 13, 2022, 12:42pm UTC](https://community.glideapps.com/t/opening-and-closing-hours-of-a-store/38351/13 "2022-02-13T12:42:35Z")

</div>

Easy to use - and you can do a lot of stuff for free too. It is a no-code backend.

My scenario for opening and closing is based on the following ‘scenario’

- opening hour module - runs at a specific time (open!) - and it updates a row in a Google Sheet ‘toggle-open’ kind of thing. The Google Sheet is used by the Glide app for visibility
- and closed is the same 🙂

So very quick to do. Doing it in Glide took hours and hours, and there were too many cases when the user device did not pick up the right time, etc. This way is automated and easy 🙂

---

<div class="post-metadata">

### Author: ![scorpio](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/scorpio/32/38799_2.png) [@scorpio](https://community.glideapps.com/u/scorpio)
#### Post date: [February 13, 2022, 1:28pm UTC](https://community.glideapps.com/t/opening-and-closing-hours-of-a-store/38351/14 "2022-02-13T13:28:11Z")

</div>

Is there an example video to see how it’s done?  
Or where can I find an example?
