Select to view content in your preferred language

Counting distinct days not working because of different times...

449
2
Jump to solution
04-04-2023 12:26 PM
Labels (1)
KenBouchard
Regular Contributor

Hi Everyone,

I have a public web form where the users have to enter a "date of issuance".  In the form, it's a date only question. However, the date is always stored with hours in the geodatabase.

I need to count how many days had issuance of that certification, so I need to count the distinct day.  But because of the time, it's considering these as 2 different values.  (I have some image below to illustrate what I'm saying)

2 questions here:

1- How come some people have their time collected as 12:00 which seems to be the normality and other are at different time?  Is it based on the time settings of their operating systems?

2- If I can't control the OS of each people entering data, can I force AGOL to always collect each entry as being 12:00? (or get rid of the time completely as it's irrelevant for me.)

Thanks in advance,

Ken

KenBouchard_2-1680635879804.png

KenBouchard_1-1680635822300.png

KenBouchard_0-1680635457011.png

 

 

0 Kudos
1 Solution

Accepted Solutions
jcarlson
MVP Esteemed Contributor

You'll see differences when edits are made from different clients, like using ArcGIS Pro rather than Survey123.

There are ways to address this. One is to calculate the field and use SQL expression like DATE(your_date_field). This would pull the date, but not the time.

But another way that doesn't modify the data is to use a Data Expression. You could easily write up an arcade expression to strip the time out of your dates, and then use the resulting FeatureSet to create your dashboard widgets.

- Josh Carlson
Kendall County GIS

View solution in original post

2 Replies
jcarlson
MVP Esteemed Contributor

You'll see differences when edits are made from different clients, like using ArcGIS Pro rather than Survey123.

There are ways to address this. One is to calculate the field and use SQL expression like DATE(your_date_field). This would pull the date, but not the time.

But another way that doesn't modify the data is to use a Data Expression. You could easily write up an arcade expression to strip the time out of your dates, and then use the resulting FeatureSet to create your dashboard widgets.

- Josh Carlson
Kendall County GIS
DavidPike
MVP Frequent Contributor

Was puzzling over how a default time could get altered, the client explanation makes perfect sense.  Do you know if Esri changed the default time from 12 am to 12pm?  I guess doing so greatly reduced the chances of date changes due to timezone differences.

0 Kudos