Weekly event

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:

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?

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?

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.

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:

``````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:

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?

4 Likes

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

I’ll take a look later today.

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

replace incorrect weekday 0 to correct 7 by tempalate and…

use correct weekday in formula.

can you offer better solve?

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.

``````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.

2 Likes

looks like a workable
I’ll keep you informed

1 Like

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