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

4109
4
Jump to solution
04-28-2016 02:22 PM
mattwilkie
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)
0 Kudos
1 Solution

Accepted Solutions
ChrisWhitmore
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
mattwilkie
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

0 Kudos
AdrianWelsh
MVP Honored 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.

0 Kudos
ChrisWhitmore
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

mattwilkie
Occasional Contributor III

Great news, thanks Chris.

0 Kudos