dateOnOrAfter and dateOnOrBefore not working together in Base filters

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!

Are you trying to trying to filter an embedded base/view ? :blush:
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 :woman_shrugging:
(I didn’t use date() though, as the keys I used are date type of keys :blush:)

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.


Ah :blush:

Then you’ll probably need to rely on self-referential properties so that would be this.wstart and this.wende :blush:

The filter of the view here is:

where dateOnOrAfter(property.date, this.start)
and dateOnOrBefore(property.date, this.end)

1 Like

Perfect :star_struck:

Thank you!

1 Like

I use dateEquals(date(property.review), date(now()))
Which filters notes with today’s review date

Works like a charm

1 Like