Rolling Calendar Availability

Good morning,

I’m developing an appointment booking app and I want the professionals to have 1 month in advance calendar with the timetable of their availability.
At the same time the users should have the chance to book within these constraints.

How can i set the rolling calendar up? Namely, how do I set up a 1 month from now table with rolling dates where each row is “today +1” until row 30? They should then be dates as I want to know the day of the week and so on…

Thanks for replying and I hope to have been clear enough

• Create a new “Helper Table”
• Add 29 rows so it would have 30 rows.
• Create a rowID column.
• Create a lookup column and target the whole rowID column above.
• Use the column type “Find Element Index”, with the input being the lookup column above as an array, and the element to find being the rowID of each row. Then you’ve got the index of each row.
• Finally, add a Math column with the formula:

N-HOUR(N)/24-MINUTE(N)/24/60-SECOND(N)/24/60/60+I+1

Edit: Sorry, forgot to explain here. N stands for the “Now” value, I would correspond to the index value.

This will give you a rolling count of “today + 1” at exactly 12AM.

3 Likes

Nice summary, @ThinhDinh.

1 Like

What’s that “`I`” do in that formula? Is that a typo?

Not quite exactly, right? Because it doesn’t remove the milliseconds component from Now. Not an issue for the majority of use cases, but I got bitten by it once.

That I is the index, so you got today plus index plus 1 and so on.

Is there a way to remove the milliseconds as well?

1 Like

ah right, sorry I missed that

Not that I’m aware of. @Jeff_Hager once suggested that it might be possible, but I haven’t found a way to do it…

1 Like

I think this was the best solution I had come up with.

2 Likes

Thank you very much!

1 Like