The feature class has a StartDate and a EndDate
I am looking for a way to create in ArcMap the following Definition Query/Query Builder:
- select records from todays date to the future. or selecting records with a EndDate > Today
- select records from todays date minus 3 years or selecting records with StartDate less than 3 years
This mxd is going to be used in a map service, so the goal is to return these values when showing the layers in a GIs viewers.
Your End Date attribute will have a syntax of how your date is stated. You can simply change the date in the query builder to match what you need. This is something that works in our feature class. I selected any value in the query builder and modified it to fit a date 3 years earlier. You could do the same for one to match today and go forward. If you have end dates the need to be between dates then use the AND operator to set between two dates like below.
LASTUPDATEDATE >= timestamp '2018-06-20 15:59:28'
LASTUPDATEDATE >= timestamp '2018-06-20 15:59:28' AND LASTUPDATEDATE <= timestamp '2021-06-15 14:25:50'