# Weekly event

**URL:** <https://community.glideapps.com/t/weekly-event/54059>\
**Category:** Ask for Help\
**Created:** [November 13, 2022, 11:15am UTC](https://community.glideapps.com/t/weekly-event/54059 "2022-11-13T11:15:29Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Voffs](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/voffs/32/879_2.png) [@Voffs](https://community.glideapps.com/u/Voffs)\
**Post date:** [November 13, 2022, 11:15am UTC](https://community.glideapps.com/t/weekly-event/54059/1 "2022-11-13T11:15:29Z")

</div>

Hi guys.  
Please help me solve the problem correctly… Quite a lot has been written on this topic, but I constantly encounter some problems…  
Objective: Show the user a weekly event, i.e. the user selects the start date of the event, and then it repeats every week at the selected time. I don’t want to use 52-53 table rows per event.  
Right now I’m using this approach:

 ![911](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/2/b/2b6a6ef53c1f338503e26eeda798b76484846301.jpeg)  
and after that i concatenate date and time…  
The problem is to correctly collect the date in order to filter events.  
Is it possible to solve the problem without using google formulas that slow down the application?  
Please help - I’m skinned out and tired so mutch

---

<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:** [November 13, 2022, 11:58am UTC](https://community.glideapps.com/t/weekly-event/54059/2 "2022-11-13T11:58:24Z")

</div>

What should the user see once they’ve created the event?  
If you want to show it as a recurring event in a calendar, then you’ll need to generate a list one way or the other.

Does the user specify an end date, or should the event repeat indefinitely?

Do you need to keep a record of past events?

---

<div class="post-metadata">

**Author:** ![Voffs](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/voffs/32/879_2.png) [@Voffs](https://community.glideapps.com/u/Voffs)\
**Post date:** [November 13, 2022, 12:18pm UTC](https://community.glideapps.com/t/weekly-event/54059/3 "2022-11-13T12:18:38Z")

</div>

The user creates an event, for example Sunday at 10 fitness. He needs to see THIS event every Sunday. I don’t need to create different events for every week. I just need a reminder every week that at 10 fitness. The date and time are recalculated every week.

---

<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:** [November 13, 2022, 2:28pm UTC](https://community.glideapps.com/t/weekly-event/54059/4 "2022-11-13T14:28:03Z")

</div>

Okay, so essentially you just need to know the date/time of the next event, based on the Event Start date/time and the current date/time - yes?

So you could do this in two steps. In the first step, calculate the time duration between the start of the week that corresponds to the event creation date/time. And in the second step, you would calculate the date/time corresponding to the start of the current week, and then add the previously calculated duration.

All of that can be done with a single Glide Math column, using the following formula:

```auto
Now 
- Weekday(Now)
- Hour(Now) * 1/24
- Minute(Now) * 1/1440
+
(Date - (
Date 
- Weekday(Date)
- Hour(Date) * 1/24
- Minute(Date) * 1/1440
))

```

In the above formula, `Now` should be replaced with the current date/time, and `Date` should be replaced with the original Event Date/time.

Here is how it would look:

 ![Screen Shot 2022-11-13 at 10.25.37 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/e/b/ebb8ed7c17663447d116f97f02709bdb0ccc962c.jpeg)

I should note that the above will only work for weekly events. For daily or monthly events, you could use a similar method, except the math would be slightly different.

Update: as per PM, this doesn’t work correctly if your week starts on Sunday. I don’t have time to look again at it now. @Jeff_Hager - if you have time, maybe you can take a look?

---

<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:** [November 14, 2022, 2:28pm UTC](https://community.glideapps.com/t/weekly-event/54059/5 "2022-11-14T14:28:38Z")

</div>

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

---

<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:** [November 14, 2022, 4:08pm UTC](https://community.glideapps.com/t/weekly-event/54059/6 "2022-11-14T16:08:35Z")

</div>



---

<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:** [November 14, 2022, 4:23pm UTC](https://community.glideapps.com/t/weekly-event/54059/7 "2022-11-14T16:23:25Z")

</div>

I’ll take a look later today.

---

<div class="post-metadata">

**Author:** ![Voffs](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/voffs/32/879_2.png) [@Voffs](https://community.glideapps.com/u/Voffs)\
**Post date:** [November 14, 2022, 4:34pm UTC](https://community.glideapps.com/t/weekly-event/54059/8 "2022-11-14T16:34:16Z")

</div>

after my dancing with a tambourine…  
i have next solve…  
correct Weekday formula

 ![911](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/f/e/fee9cb2d601bf3f55010b6c574a25d3be8f8fe14.jpeg)  
replace incorrect weekday 0 to correct 7 by tempalate and…  
 ![912](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/7/8/782e95a474f45aafeeac7dca0b4e8f0b7aeea9e5.jpeg)  
use correct weekday in formula.  
 ![913](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/4/7/47ea4d0d3a01cf4383f73c909ffdf117de0ab67f.jpeg)  
can you offer better solve?

---

<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:** [November 15, 2022, 6:29am UTC](https://community.glideapps.com/t/weekly-event/54059/9 "2022-11-15T06:29:54Z")

</div>

Here’s what I came up with. I think it’s working correctly. The way I have it set up right now, if the event is today (regardless of time), it will continue to show as today’s date until midnight. After midnight the date will automatically update to the next week. I guess to me it makes sense for the event to continue to show for today until the day is over, instead of changing to the next week after the specific time has passed.

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

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

```auto
Date+((Now
      - Hour(Now) * 1/24
      - Minute(Now) * 1/1440)
     -(Date
      - Hour(Date) * 1/24
      - Minute(Date) * 1/1440))
+
(Weekday(Date)-Weekday(Now))
+
Mod(Weekday(Date)-Weekday(Now),1)*7

```

Let me know if something doesn’t look right, or if it’s not working as expected.

---

<div class="post-metadata">

**Author:** ![Voffs](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/voffs/32/879_2.png) [@Voffs](https://community.glideapps.com/u/Voffs)\
**Post date:** [November 15, 2022, 9:13am UTC](https://community.glideapps.com/t/weekly-event/54059/10 "2022-11-15T09:13:27Z")

</div>

looks like a workable 😀  
I’ll keep you informed  
🫂

---

<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:** [November 16, 2022, 9:13am UTC](https://community.glideapps.com/t/weekly-event/54059/11 "2022-11-16T09:13:34Z")

</div>

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