0

I'm working with geoserver ,and i want to filter my layer by date (WFS), i have two columns : Date_start and Date_end

i would like to display only feature that verify this condition : Date_PRESENT >Date_start and Date_PRESENT<Date_end

where Date_PRESENT is the current date and time. i dont wanna put today's date in manually,I want to do it based on the present without a need to adjust the CQL filter.

Following the docs regarding temporal predicates, I can get close: https://docs.geoserver.org/latest/en/user/filter/ecql_reference.html#temporal-predicate But i can't find how to get the current date

thanks

work
  • 27
  • 4
  • 12

1 Answers1

2

Try with now() > Date_Start and now() < Date_End

See also the full CQL function reference: https://docs.geoserver.org/stable/en/user/filter/function_reference.html#temporal-functions

Andrea Aime
  • 1,706
  • 11
  • 16