Show events of specific day

Maybe I’m missing something very obvious because it’s very basic, but I can’t find it.

I have a table with events, with a start date and end date for each one.

I want to show in a tab only the events of a specific day. For example, a special tab to see the events of Saturday, March 23. How do I filter? I have seen comparisons but they are with “Now” or “Today”, I can’t compare with a specific date.

Where are you storing the March 23rd date?

Can your Start and End Dates span multiple days?
So for example March 20th through March 31st.

Nowhere, is hardcoded.

I found a solution with the “date format” special column. Geting the day and compare with “is”. But I found another problem…:d → Something is wrong with Date Format mm/dd and dd/mm

let me get to s computer and I’ll double check. there should be a better way

You should be able to do this with a filter.

Assuming your data looks something like this:
image

Then you set a filter on your list like this:

But creating a column just to store the same Day in all rows, isn’t that a bit strange and waste of resources? That datetime does not belong in that table, as do the start and end dates of an event, but not one that you want to filter by.

You can only compare dates to other dates, so regardless, the start date, end date, and the date you are comparing to need to be dates. If you want, you store that comparing date in the first row of the same table, or in a single row in another table. Then bring it into the table with your start and end dates using a single value column. That will the date in a single row and populate it across all rows in any other table you want. The Single Value column respects the column type it’s referring to, so it will still be a date.

1 Like

I mean, I understand that to obtain something very special it is normal to squeeze the possibilities of the platform and look for shortcuts, even if they are not very efficient or ugly.

But I think that the action “show me the events of this particular day” is quite normal.

Anyway it’s good to know the limitations, I take note of your advice and thank you very much!

I guess I don’t understand what you see as a limitation or a shortcut. I think it’s pretty powerful that glide allows us to make these kinds of comparisons. I consider a feature. If you want to check if a date fits within a start and end date, then you have to have something to compare to.

As far as efficiency. A single value column is very efficient because it takes a single value to populates it on multiple rows. It performs that action once instead of performing it on each row.
There is no processing on glides end for computed columns like this. It all happens on the end user’s device and happens instantly.

Of course, what I find strange is that in the filtering options, there is “Today”, “Now” and compare with other fields in the database. But not a datepicker to compare with a specific date.

I understand what you are saying, but I guess I see that as a non-typical situation. The app should be data driven. Would you prefer to open the glide builder to manually change a filter whenever you want something different and wait for that change to publish out to the users, or would you rather change a value via the app, so it automatically populates across all rows and allow the filter to check that date. Then it would be as simple as changing a preferred date using the app instead of having to go back to the builder.

It’s much better in the long run to make your app data driven and dynamic, instead of hardcoding a bunch of logic and then having to go back into the builder anytime you want to make a change.

1 Like

Yes, unless the app is for an event that occurs in a specific week of the year. Then it is useful and not to juggle adding columns that do not belong to the data. But I understand what you mean :wink: