Select to view content in your preferred language

With popups from CSV upload, Date gets bogus time stamp, Time is missing

3691
9
09-19-2012 04:57 AM
DonBarker
Regular Contributor
Am uploading CSV files to AGOL for Orgs maps.  Problems with Date and Time fields:

1.  The Date values get displayed in popups with a bogus time stamp.  I can reformat this popup field each time I update.  But I don't want to. How do I format the date field in the CSV file to prevent this?

2.  The HHMM Time value in the popup is simply missing.  To make it reappear, I have to reformat the CSV column as Text.  But that's not enough. I also have rename the column to anything but Time.  I don't want to.

There's more to it than just this.  I tried all kinds of Time workarounds and got weird results.  Too long to document here.

Where is the tutorial on formatting Date and Time for CSV uploads?

Thanks,
Tags (2)
0 Kudos
9 Replies
MikeMinami
Esri Notable Contributor
What do you mean bogus time stamp? There is a time shift that occurs from UTC time. Is this what you are seeing?

http://forums.arcgis.com/threads/34299-Web-Map-shows-wrong-quot-beach-sampling-date-quot-in-popup-wi...

Thanks,

Mike
0 Kudos
DonBarker
Regular Contributor
Thanks for your question.

What I mean is, we use a date format with no time stamp.  The time stamp is added by the server when we upload the CSV.  It's always timestamped 8:00 PM.  Like it's calculating from UTM to Esri's server timezone.  See the attached pic.

We want no time stamp.  We don't want to be forced to use the Config Popup wizard  every time we update the data with a new CSV upload.

Thanks.
0 Kudos
DonBarker
Regular Contributor
Forgot to mention.... Your link above points to a post of mine last year.  But that was different.  That data was coming from a bonafide map service from ArcGIS Server.   This is CSV upload.  Thanks.
0 Kudos
MikeMinami
Esri Notable Contributor
It doesn't really matter where the data comes from, date fields are handled the same way.

If you are loading this CSV directly into the map, the ArcGIS.com map viewer doesn't have any option to specify the field type of the Date field. It gets imported as a date field, and the browser will adjust the display according to the browser's local time. However, ArcGIS Explorer Online will let you choose a field type as "text" instead of date. So, you can initially upload this CSV layer into the web map using Explorer Online.

Alternatively, you can create a feature service out of your CSV. By adding the CSV as an item to your My Content, you have the option to publish a feature service, and also specify that the date field should be imported as a string field.

Thanks,

Mike
0 Kudos
DonBarker
Regular Contributor
This is intriguing:

you can create a feature service out of your CSV. By adding the CSV as an item to your My Content, you have the option to publish a feature service, and also specify that the date field should be imported as a string field.


I'll look for the Help on this and call back here if I can't find it.

Thanks!
0 Kudos
MikeMinami
Esri Notable Contributor
Attached is an image from the Publish dialog that shows you how to change the field type.

http://resources.arcgis.com/en/help/arcgisonline/#/Publishing_a_hosted_feature_service_using_a_shape...

Thanks,

Mike
0 Kudos
DonBarker
Regular Contributor
This is great.  Thanks for this.

Also seems to address our other problem of publishing from Sharepoint to AGO for Orgs without programming in the ArcGIS-Sharepoint API.  We're exporting to Excel then uploading CSV updates. Which requires reconfig of the AGOL map layer each time.  Maybe this will preclude that.

😄
0 Kudos
MikeMinami
Esri Notable Contributor
I don't think it will solve the problem. Updating a CSV requires deleting the existing service and recreating it. Any configurations saved to the service will be removed (I believe).

Have you considered making updates directly to the feature service? By default, editing is disabled, but click Edit button on the item details page to change this. You could also write code against the API to push updates into the feature service.

We are working on better synchronization, but I believe it will require publishing from ArcGIS Desktop.

Mike
0 Kudos
DonBarker
Regular Contributor
Publishing to AGS is probably a viable option for us, not far down the road.

For now, wishing to keep Sharepoint list/map + AGOL map in sync.  Lost the Sharpoint "publish to ArcGIS.com" capability about 18 months ago, I believe.
0 Kudos