GNSS Metadata DateTime Fields

495
2
02-16-2018 01:17 PM
JohnWhitman
New Contributor II

I've used the Field Notes template to add GNSS metadata fields to a webmap. Some of those fields include both a date and a time. When opened in ArcMap on my desktop and then exported as a shapefile, those fields show only the date, but omit the time. I've been advised by ESRI Support that this is probably because shapefiles support Date as a field type, but don't allow the time to be included. (I'm told that the Tracking Analyst extension might allow dates and times to be concatenated in a field, but don't have that extension.) It would be advantageous to me if I could retain the time as well as the date when I'm working in ArcMap. So far, my workaround (practical for only a small number of records) is to write down the time values as I see them in the webmap, then manually populate a string field named "Time" with those values. It would seem desirable if Collector were to put the data and time information for GNSS metadata into separate fields so that this cumbersome### workaround would not be required.

Tags (2)
0 Kudos
2 Replies
PeterKnoop
MVP Regular Contributor

It is indeed a limitation of the shapefile format. A "date" type field in a shapefile or a coverage can only store date values, not date and time values. One place you'll find this information is in the ArcMap documentation on the Fundamentals of date fields, "A coverage or shapefile stores dates in a date field with this format: yyyy-mm-dd. A geodatabase formats the date as datetime yyyy-mm-dd hh:mm:ss AM or PM."

If you leave your data in the geodatabase format in which it comes from Collector, rather than converting it to a shapefile, then your field won't be truncated to date-only, and no workaround is required. 

If you have some other need that is forcing you to use the shapefile format, then before you export from the geodatabase, you can split your "date" field into two separate fields, one for the data value and one for the time value. There a lots of ways to do that, one being to use the Field Calculator and its VB Script DatePart() function. For details, plesae see this helpful Esri Technical Article, How To: Extract a portion of the Date field.

0 Kudos
JohnWhitman
New Contributor II

Hi Peter!

Thanks very much for your guidance. Following it, I was able to export my data as a file geodatabase, then downloaded it and opened it in ArcMap on my desktop. There I was not only able to see the date and time together in a single field, but (also happily) was able to see the alias names of the GNSS metadata fields, rather than having to reconstruct them manually.

Since I didn’t have any important reason to be exporting as a shapefile – other than the fact that I’m more used to shapefiles than geodatabases – I haven’t yet tried your other suggestion of using the DatePart function in the Field Calculator. I will try that also since it seems a good additional arrow to have in my quiver.

I’ve copied Randy Burton on this message since he also replied to my original question.

Thanks again for your prompt and very helpful message!

Sincerely,

JGWjr

John G. Whitman, Jr.

Green Forest Farm

PO Box 177 (1011 Potter Hill Rd)

Readsboro, VT 05350-0177

(802) 423-9917

0 Kudos