Dashboard Date Selector with wrong time

939
2
Jump to solution
05-17-2022 01:53 PM
RoseZhou2
Frequent Contributor

Hello,

I have a dashboard with a Date Selector (type=Advanced). Please see the screenshot below.

DateSelector.PNG 

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

0 Kudos
1 Solution

Accepted Solutions
RoseZhou2
Frequent Contributor

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

View solution in original post

0 Kudos
2 Replies
RoseZhou2
Frequent Contributor

By the way, I am using ArcGIS Enterprise version 10.8.1 Portal built-in dashboard.

Rose

0 Kudos
RoseZhou2
Frequent Contributor

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

0 Kudos