I just remembered something from a long time ago. I don’t remember if I had posted about it in this forum or in the old spectrum forum. Can’t find the post in either forum right now.
Working on these posts re-triggered this memory.
What I had discovered back then is how ridiculously forgiving the calendar layout is. It can take dates in a variety of formats and still determine the correct date to show. But the really cool thing I had discovered is that you can feed it certain types of text and it will figure out the correct date. I just realized you can do the same thing with a date column.
For example, type the following in a date column and it will convert it to the correct date:
- 3 days ago
- 3 days from now
- 3 years
- 3 years ago
- next week
- last week
- next month
- last month
- monday (nearest date)
- august (nearest date)
You get the idea. It’s awesome because if you type in that text, it will do the math for you and return the correct date. The only downside is that it only seems to do the math from today, so I’m not sure how to do the same thing with different dates other than today. I’ve known for a long time that this was possible with the calendar layout, but I didn’t put two-and-two together until now that it will also work with a date column. This might be useful for some kind of recurring events or some other logic.
I’d be curious if anybody else discovers some other text that works or some other use cases. It appears that it converts the text to a static date, so it will not continually roll as the date and time changes. Could be useful in a form where you just want to write a date two weeks from now without making a user select a date in a calendar or doing some backend date math to figure it out. Might save on a couple of computed columns.
Maybe the Glide team could shed some light on all the possible combinations of text that can be converted into a calculated date.