1

This question already has an answer here:

I was looking to keep the date/time as is when using field calculator to keep the format as I'm not able to maintain the time in the new field "da". This is what I get when trying to do so. I tried searching for solutions, but to no avail so far.

Update based on comments:

I'm using field calculator to solve this.
I'm calculating into a date field from string field.
Data source is a shapefile

enter image description here

marked as duplicate by BERA, Jochen Schwarze, Vince, Community Oct 16 '18 at 16:52

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    are you using python in the field calculator? this may be helpful... stackoverflow.com/questions/466345/… – Lovette Oct 15 '18 at 18:25
  • 1
    I had to create a text field. It would not add the time into a date field. Are you calculating into a text field or a date field? – jbalk Oct 15 '18 at 18:32
  • 1
    And what is your data source, a SHP file, FGDB, SDE...? – John Oct 15 '18 at 19:03
  • I've updated my question to answer all questions in the top comments above.I'm using field calculator to solve this. I'm calculating into a date field from string field. Data source is a shapefile – whyzar Oct 15 '18 at 20:23
  • 1
    Shapefiles use dBase's date type, which does not support time. You cannot preserve time in the shapefile format. – Vince Oct 16 '18 at 0:36
2
  • Is ShotDate as string field?
  • Is da a date field?
  • Are you copying ShortDate to da? And if so how (Field calculator with VB Script)?
  • Can you enlarge the column size of the da field and check if the value has a time component

If da is the date field and this is the field you want to have the formatting I believe that is all controlled at the Windows level.

From fundamentals-of-date-fields:

Settings on your Windows system determine how the dates are displayed in ArcMap—M/d/yy, MM/dd/yy, yy/MM/dd, and so on. ArcMap uses the system short date format (numerical) for displaying dates.

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