ArcMap - Definition query using dates to select current week

90
1
05-27-2020 10:01 AM
Highlighted
Occasional Contributor III

I would like to write a definition query expression to get features where a date field is in the current week (starting Sunday ending Saturday)

I have difficulties to imagine how using CURRENT_DATE would help me in that case.

I want the definition expression to returns the same features from Sunday to Saturday.

My feature class is stored in PostGreSQL (ArcGIS Enterprise)

Reply
0 Kudos
1 Reply
Highlighted
MVP Esteemed Contributor

Some good discussion here:  how to get data of current week only in SQL server? - Stack Overflow .  The discussion is focused on SQL Server but Postgres also has a DatePart function (PostgreSQL: Documentation: 12: 9.9. Date/Time Functions and Operators ).

Reply
0 Kudos