I have dates in my attribute table that are stored as strings - they look like 02/22/2012 (mm/dd/yyyy) - and I would like to convert them to Date type. When I try to input a custom date format in the Convert Time Field geoprocessing tool it returns in all the records and I am not sure what I am doing wrong. I've tried MM/dd/yyyy and MMddyyyy - is there something I'm missing about setting up a custom date format? Or, is there another way I can do this?
I created a shapefile with a string field with dates in the 02/22/2012 format and was able to convert it using the "Convert Time Field" tool after a couple tries. On my successful attempt I created a new field of type date and then ran the date conversion tool. For the custom format I used "MM/dd/yyyy". I also specified the newly created date field as the output time field. I checked the method with errors in the strings and even a string like "2/5/12" was converted to 2/5/2012. (My initial failures came because I assumed the tool would create a new date field for me, that didn't happen during my test.)
I hope this helps.
I just tested this and MM/dd/yyyy worked okay for me. Is it possible that there is a value in your string field that is not in this format? Maybe there are one or two records hiding in your string field with something like '2/22/2012' instead of '02/22/2012'.
I have been able to do this using ArcGIS 10.2.
When I run the Convert Time Field tool on a GDB table of 20000 rows, it says it has completed successfully but no values are updated in the target field (nulls).
However, if I run it after first selecting all the records in the table (obviously you need to be in ArcMap to do this), then it updates the values as expected!