More

Arcmap layer export as shapefile, in the dbf file the time value is missing


In arcmap, I export a layer as shapefile. After that I find from the dbf file, the editor tracking date-time columns (created_date, last_edited_date) value only contain the date value, The time value is not available.

Is it normal? How can I get the time value in the dbf file also?

I am using arcmap 10.2.2.


It as as user30184 said. DBF tables/shapefiles do not support time values in the same field as date values. You can, however, split the datetime value over a date field and a text field containing the time. However you won't be able to run proper queries on this time field as its values are not recognised as proper time values. Shapefiles don't support datetimes, just dates. They probably will never. Instead, you can export your data to a personal geodatabase feature class, which will make it possible to edit the table's values in a database management program like MS Access.

EDIT: I added a comment, tried to edit it but I couldn't edit it for more than 5 minutes so now it's lost.

This is what I wanted to say: You could make two seperate fields in the shapefile for date and time and use VB script (or python) to extract just the date (vb script function DateValue() )or just the time (vb script function TimeValue()) from the datetimefield. Another idea that just came up is storing the datetime as a long integer, in seconds since 1-1-1900 (Excel does kind of the same thing if I recall correctly). This does retain the proper value of the datetime, although it's not convenient to work with.


Watch the video: Export vector file format to dbf format in ArcGIS (October 2021).