Hello,
I have a dashboard with a Date Selector (type=Advanced). Please see the screenshot below.
When select "Past 14 days", from web browser's Developer's tool, I found it queried the date range more than 14 days. For example if I select it at 4:45 pm EST, May 17th, the "where" clause is:
date <=timestamp '2022-05-17 21:45:10' AND date >=timestamp '202-05-03 04:00:00'
It's more than 14 days! I have another web map with filer set: 'date in the last 2 weeks'. This web map queries exactly 14 days, from date <=timestamp '2022-05-17 21:45:10' AND date >=timestamp '202-05-03 21:45:10'.
The dashboard and the web map return different result due to different query time period. How to make those two consistent?
Rose
Solved! Go to Solution.
For those may encounter the same issue, I have found a solution.
In the feature layer within the web map, I used following definition query before:
date BETWEEN CURRENT_TIMESTAMP - INTERVAL '14' DAY AND CURRENT_TIMESTAMP
After I changed to following, it’s working:
date BETWEEN CURRENT_DATE - INTERVAL '14' DAY AND CURRENT_TIMESTAMP
Rose
By the way, I am using ArcGIS Enterprise version 10.8.1 Portal built-in dashboard.
Rose
For those may encounter the same issue, I have found a solution.
In the feature layer within the web map, I used following definition query before:
date BETWEEN CURRENT_TIMESTAMP - INTERVAL '14' DAY AND CURRENT_TIMESTAMP
After I changed to following, it’s working:
date BETWEEN CURRENT_DATE - INTERVAL '14' DAY AND CURRENT_TIMESTAMP
Rose