You are here: > ESRI Forums > arcgis desktop discussion forums > Thread Replies

ArcGIS Desktop Discussion Forums

ArcGIS Desktop - Data Management (General) forum

problem displaying time values when importi...   Philippe Amstislavski May 01, 2008
Re: problem displaying time values when imp...   Stephen Lead May 01, 2008
Re: problem displaying time values when imp...   Philippe Amstislavski May 02, 2008
Re: problem displaying time values when imp...   Stephen Lead May 04, 2008
Re: problem displaying time values when imp...   Philippe Amstislavski May 05, 2008
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject problem displaying time values when importing GPS data into ArcMap 
Author Philippe Amstislavski 
Date May 01, 2008 
Message Hi,

When importing GPS data into ArcGIS I have not been able retain the time-stamped column. I've been able to import GPS waypoint data from Excel into ArcMap as a CSV table by adding X and Y, applying a coordinate system (NAD 83) and exporting the table as a shapefile.

When I add this new shapefile to ArcMap the GPS data display correctly except for the time column—it defaults to 12:00:00 AM! A friend suggested the following workaround—format the Time column as number in Excel, then follow the steps above to create shapefile. In the attribute table of the new shapefile add a new column and format it as text field. Then, use field calculator to run the following script:

Hour( [Time_G] ) & ":" & Minute( [Time_G] ) & ":" & Second ( [Time_G] )

The hope was that the output of this code would be the correct time. However, when I run it I get the following message error--"Field name was not found or there were unbalanced quotation marks" Does anybody out there have a solution for this frustrating problem?

Thanks!

Philippe
 
  Philippe Amstislavski
Director, Medical Informatics
WTC Data & Coordination Center
Mount Sinai School of Medicine
New York, New York


 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: problem displaying time values when importing GPS data into ArcMap 
Author Stephen Lead 
Date May 01, 2008 
Message Philippe,

One of the limitations of a shapefile is that it can't store date and time in the same DATE field.

A workaround could be to store the date in a field which is formatted as DATE type, and the time in a text field.

Alternatively, are you able to use a geodatabase instead? A geodatabase can hold date and time in the same DATE field.

If not, can you please post a sample of the first couple of lines in your GPS file? Either a few lines in Excel, or the first few lines of the CSV file, or simply copy and paste into the forum if it won't let you add an attachment (which sometimes happens).

Steve 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: problem displaying time values when importing GPS data into ArcMap 
Author Philippe Amstislavski 
Date May 02, 2008 
Message Hi

Thanks for help. Attached are a few records saved as a .csv file. I did parse time and date into 2 different columns but the problem remains--all timestamps get reset to 12 noon when I export the table it as shapefile.

Thanks again,
Philippe
 
  Philippe Amstislavski
Director, Medical Informatics
WTC Data & Coordination Center
Mount Sinai School of Medicine
New York, New York


 
  sample.csv (opens in new window)
 
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: problem displaying time values when importing GPS data into ArcMap 
Author Stephen Lead 
Date May 04, 2008 
Message Hi Philippe,

See the posting from Lance Shipman at ESRI at http://forums.esri.com/Thread.asp?c=93&f=985&t=218476 where he says "Shapefiles only support date fields. Time is not supported."

Do you need to export to a shapefile, or are you able to use other spatial formats? A personal geodatabase won't exhibit the problem with the time field being reset.

I took these steps to create a single date/time field with your data:

- create a new personal geodatabase in ArcCatalog
- import your CSV table into this geodatabase as a table
- add a new field of type DATE
- add the table to ArcMap and open it
- right-click on the new field and calculate it to be:

[Date_] & " " & [Timestamp_]

You now have a table with X and Y coordinates, and the date/time in the same field, so you can convert this to an event layer and export to a featureclass. If you write the featureclass back into the same personal geodatabase, the time information will be preserved.

Otherwise, if you do need to use shapefiles, add a new Text field to the table and calculate it to be [Timestamp_]. This value will be preserved in the shapefile as a text string. The disadvantage of this is that you won't be able to perform analysis, like selecting events before or after a particular time.

Good luck,
Steve 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: problem displaying time values when importing GPS data into ArcMap 
Author Philippe Amstislavski 
Date May 05, 2008 
Message Hi Steve,

Thank you very much for your thoughtful reply.

I figured out how to convert time in the shapefile so it solved the problem. I saved the time column as number. After I exported the .csv file as a shapefile I created a new column and run the following VBscript using field calculator:

Hour( [Name of your numeric time field] ) & ":" & Minute( [Name of your numeric time field] ) & ":" & Second ( [Name of your numeric time field] )

It converted time from decimal to the regular HH:MM:SS format. I never used geodatabases but based on your suggestion shall experiment with them to see if this process is more straight-forward.


Thanks again!

Philippe 
  Philippe Amstislavski
Director, Medical Informatics
WTC Data & Coordination Center
Mount Sinai School of Medicine
New York, New York