perhaps someone here knows of a cleaner/better/more elegant way to do this
i have a simple table with Events and there is a column for Start date/time
i have a control where the user can select a date and i want to filter the events only for that date
with this formula Events.filter(Start = date_filter_control)
i get no matches. presumably because the comparison function is also looking for a match of the time, but the date_filter_control
does not have a time, only a date.
i made it work like this Events.filter(Start > date_filter_control AND Start < date_filter_control + 1)
in other words, the start date is at least one second past midnight of the date on the date_filter_control and less than the beginning of the next day.
the reason for this post is that i would think i could make this work by comparing the start column to the date_filter_control, but that comes back blank. however, this approach does seem to work in other places, maybe someone can explain what i am not getting about how to compare dates
this is a calculated column in a table that summarizes the Events table:
Events.Filter(thisRow.Name = Category AND Start = Today()).Duration.Sum()
in the formula above, i am comparing the same Start column, this time to Today() and here it works, even though today is only a date (no time) like in the date_filter_control.
i suspect i may not be getting something really basic or maybe this is just how it works