Dates in ArcGIS Online

9445
10
04-07-2015 01:41 PM
LakshmiSankaran
Occasional Contributor

I am noticing that a date e.g. 4/6/2015, entered in a SDE Feature Class (SQL 2008 R2) is translating to the day before in ArcGIS Online. The date field being a date-time field, and entered in as 4/6/2015 WITHOUT the time, is defaulting to 4/6/2015 12 am which is translating in an ArcGIS online map as 4/5/2015. Has anyone else noticed this?

Thanks

Lakshmi Sankaran

SDE Admin

Tags (2)
10 Replies
KyleBalke__GISP
Occasional Contributor III

Yes we experienced the same issue yesterday when publishing from a feature class to a hosted feature service.  I tried several fixes including setting the time zone as UTC without success.

Kyle Balke

0 Kudos
SepheFox
Frequent Contributor

This is a great post and a good catch, Lakshmi. I'm sure other users will find it useful to know about this issue.

0 Kudos
MaryEllen_Perko
Occasional Contributor II

Hi.  Does anyone know if there is a good way to get around this?  I've read about a couple of options but neither is ideal:

1. Change the dates to UTM - which doesn't really work well for us when using internally hosted services in other applications besides ArcGIS Online/web apps.

2. Change dates to a text format - which is a little better until someone wants to filter or search for features on date ranges.

If anyone can point me to other options, I'd appreciate it.  Thanks.

0 Kudos
KyleBalke__GISP
Occasional Contributor III

Mary

My current work around is to create a new Date/Time field and then add one day to my original Date field using the Field Calculator:

DateAdd ("d",1, [DATE]  )

Therefore my original date of 5/20/2000 becomes 5/21/2000 in the newly calculated field.  I then publish to ArcGIS Online and my new Date field is correct since I have accounted for the date being dropped by one day.  Hope this makes sense.

Here is the VB reference for the DateAdd function:

Understanding VB6's DateAdd function | Visual Basic 6 (VB6)

Best,

Kyle

0 Kudos
TimMinter
Occasional Contributor III

SQL Server queries can return unexpected and undesired date rounding.  This might be what's happening between ArcGIS Server and SQL Server, and you might want to pursue this possibility.

0 Kudos
RoyceSimpson
Occasional Contributor III

This is a known issue feature.  Not sure how to get around it.  Here's the AGOL doc on the topic.  Go down to the Date section.

Work with fields—ArcGIS Online Help | ArcGIS

0 Kudos
MargaretM
New Contributor III

Yes, we experienced this and I called ESRI Support about it.  The answer is in ArcMap, go to the Time tab in Layer Properties and enable Time.  Select the appropriate field for your date/time value and then set your local Time Zone.  Then when you publish to AGOL, you'll have the correct date.

Hope this helps.

LakshmiSankaran
Occasional Contributor

Thank you for your helpful replies

0 Kudos
EdApalinski
Occasional Contributor

Hi, the issue with this work around is you can only set the time property for one field in the feature class.  If there are multiple fields i believe you can only set one.

Best

0 Kudos