I’m working with a Base that filters notes using date properties. This works:
dateOnOrAfter(date(property.datum), date(property.wstart))
And this also works:
dateOnOrBefore(date(property.datum), date(property.wende))
But combining both:
dateOnOrAfter(date(property.datum), date(property.wstart))
dateOnOrBefore(date(property.datum), date(property.wende))
returns no results — even though the data clearly matches the conditions.
All properties (datum, wstart, wende) are set and correctly formatted as YYYY-MM-DD.
Is this a known issue with date comparisons in Bases? Could this be a bug or an issue with type coercion?
I’d appreciate any insights or workarounds!
Pch
May 26, 2025, 9:46am
2
Are you trying to trying to filter an embedded base/view ?
Are the start date and end date all the same ?
(if not, you’ll be comparing a date to multiple various ranges)
I tried to replicate your setup, based on your description … but it seems to work as expected for me …
(I didn’t use date()
though, as the keys I used are date
type of keys )
I am trying to create a week view where only the week note has the start and end dates. The filtered files just have a date.
Pch
May 26, 2025, 10:14am
4
Ah
Then you’ll probably need to rely on self-referential properties so that would be this.wstart
and this.wende
…
The filter of the view here is:
where dateOnOrAfter(property.date, this.start)
and dateOnOrBefore(property.date, this.end)
1 Like
armin
May 29, 2025, 4:10am
6
I use dateEquals(date(property.review), date(now()))
Which filters notes with today’s review date
Works like a charm
1 Like