I am trying to save a time in a shapefile's DATE field (without a date, because shapefile can only store something one simultaneously - date or time).

I use field calculator with PYTHON parser. I am typing a string '12:01:51'. After pushing OK button it seems all right - no error, but the value turns to 0:00:00.

What do i do wrong?

enter image description here

  • I could reproduce your error. This seems to be a bug since the documentation says it's possible. But why don't you use a feature class? – GISGe Nov 19 '14 at 10:28
  • @GeoGE: Idle curiosity, without ArcView knowlege: With a shapefile that has a field which is a Date/Time field, can one feature/dataPoint/Row contain a date, and another dataPoint contain a time? I ask, wondering if the date/time choice is by file, rather than dataPoint, and then wondering if once the choice is made for the file, it is a fixed choice, and...then...wondering if you set a field to date on first use of the file's date/time field... – John Nov 19 '14 at 10:32
  • @John Yes you can do that, doesn't seem to be convenient to manage/query etc at first sight but why not? Field values for one row don't influence values for other rows. But there seems to be a bug with shapefiles so you could only use dates anyway (use a feature class instead). – GISGe Nov 19 '14 at 10:49
  • I send request to support. Will see what they say. – Mr. Che Nov 19 '14 at 11:28

I got support's answer. They said it is well known issue and quote from this documentation is wrong:

Date fields support either the date or the time, but not both in the same field.

Document will be changed soon.

Also they said that I could use text field for time values in shape file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.