[GIS] Why does ArcGIS 10 Convert Time Field geoprocessing tool return when using custom format

arcgis-10.0arcgis-desktopconverttime

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?

Best Answer

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.