Ok, so I have this layer in a web map with point features that represent a type of incident. Each incident has a date of occurrence (a column with a date format named fecha) associated to it with no information on time (dd/mm/yyyy). I want the web map to filter the layer so that it only shows incidents that occurred this year by editing its JSON file (using AGOL Assistant) and inserting a dynamic date SQL Query.
Here is what I’ve been trying to use:
(EXTRACT(YEAR FROM fecha) = EXTRACT(YEAR FROM CURRENT_DATE))
The query filters the layer by equating the year from the DATE column (fecha) to the year corresponding to the current date.
The query works, but it returns all the incidents that occurred on the current year (2019) except for December 31 of that year. However, it also includes the incidents occurring on December 31 of the previous year (2018). I don’t know if someone has already experienced this and if there’s a workaround.