Web map: filter features by "last two weeks"?

3125
4
Jump to solution
04-28-2016 02:22 PM
Highlighted
Occasional Contributor III

For a hosted feature layer in an web map how can filter so that only the last n weeks are shown? Relying entirely on ArcGIS Online infrastructure?

I know I can add a filter for [Date] [is after] [01/04/2016], but that requires having to edit the filter every day to stay on top of it. How can I use a relative phrase like [Today - 14 days]?

filter-date-num-days.png

Tags (3)
Reply
0 Kudos
1 Solution

Accepted Solutions
Highlighted
Esri Regular Contributor

Hi - wanted to drop a note that the upcoming ArcGIS Online release (mid June) will have this functionality. You will be able to apply filters relative to the current date (i.e, filter using the last week, last weeks, month, etc.).

Enhanced date field queries will also extend to calculate field. time offsets can be calculated and fields updated based on the calculation (say to update for a specific time zone or create a new field for inspection dates based on an installation date field). And can also perform calculations that will give the difference between two date fields as a float number output in terms of days (down to the second). For ex, DATE'6/30/2016 18:00' - DATE'6/1/2016 12:00' would output 29.25 days.

Thanks,

Chris

View solution in original post

4 Replies
Highlighted
Occasional Contributor III

Anticipating a "you can't" answer, here's a request to add the feature, go vote it up:

ArcGIS Idea - Filter options for dates in arcgis online features

Reply
0 Kudos
Highlighted
MVP Notable Contributor

Matt,

This is an interesting idea and I'm glad to see it listed in the Ideas section.

I am tagging Owen Evans​ on this to see if he has any input.

Reply
0 Kudos
Highlighted
Esri Regular Contributor

Hi - wanted to drop a note that the upcoming ArcGIS Online release (mid June) will have this functionality. You will be able to apply filters relative to the current date (i.e, filter using the last week, last weeks, month, etc.).

Enhanced date field queries will also extend to calculate field. time offsets can be calculated and fields updated based on the calculation (say to update for a specific time zone or create a new field for inspection dates based on an installation date field). And can also perform calculations that will give the difference between two date fields as a float number output in terms of days (down to the second). For ex, DATE'6/30/2016 18:00' - DATE'6/1/2016 12:00' would output 29.25 days.

Thanks,

Chris

View solution in original post

Highlighted
Occasional Contributor III

Great news, thanks Chris.

Reply
0 Kudos