Hi all,
Is it possible to symbolise by age in ArcGIS Online Map Viewer on a Live Feature Class.
I can symbolise by age, however it requries that you set a date for the symbology to apply to, unfortunately you cannot select latest date for example.
If not possible I'll submit as an idea.
Cheers,
Cam
Solved! Go to Solution.
Hi Cameron McArtney,
This is an example arcade expression which classifies features based on current date.
if (DateDiff(Now(), Date($feature.Date_Stamp), 'days') <= 1) {
return "Features captured within the last day" }
else if (DateDiff(Now(), Date($feature.Date_Stamp), 'days') > 2 &&
DateDiff(Now(), Date($feature.Date_Stamp), 'days') < 5) {
return "Features captured between 2 to 5 days ago" }
else if (DateDiff(Now(), Date($feature.Date_Stamp), 'days') >= 5) {
return "Features captured more than 5 days ago" }
else {
return "None of these conditions" }
you can change days to hours, minutes, months, ....
More information is in the link below:
Cameron McArtney, never done it before and just a suggestion, can you use arcade expression to get the age then apply the symbology? Similar to
Hi Cameron McArtney,
This is an example arcade expression which classifies features based on current date.
if (DateDiff(Now(), Date($feature.Date_Stamp), 'days') <= 1) {
return "Features captured within the last day" }
else if (DateDiff(Now(), Date($feature.Date_Stamp), 'days') > 2 &&
DateDiff(Now(), Date($feature.Date_Stamp), 'days') < 5) {
return "Features captured between 2 to 5 days ago" }
else if (DateDiff(Now(), Date($feature.Date_Stamp), 'days') >= 5) {
return "Features captured more than 5 days ago" }
else {
return "None of these conditions" }
you can change days to hours, minutes, months, ....
More information is in the link below:
thanks Mehdi Pira I just used the same code for a different scenario last week! thanks for digging this up and adding the solution!
Not a problem, Cam.