[GIS] Remove time stamp from date field using field calculator

arcgis-desktoparcmapdatefield-calculator

I'm trying to copy the dates from a field called InspectionDate (date data type) to new field called CompletedDate (date data type) but I don't want the time stamp to be copied over. How can I copy just the date in a mm,dd,yyyy format using field calculator. For example copying 1/1/2016 12:00:00 AM to new field as 1/1/2016.

Best Answer

You can't remove the Hours/Minutes/Seconds while using the Date field type. You will have to convert to an alternative field type.

From ESRI on Working with Date Fields:

Enter dates in MM/DD/YYYY hh:mm:ss format

Regardless of how dates are displayed in the table, you can only enter dates in MM/DD/YYYY hh:mm:ss format, enclosed in single quotation marks. For example, to set a date field to 5:00PM on May 27, 2014, you would type '05/27/2014 05:00:00PM', '05/27/2014 5:00PM', or '05/27/2014 17:00:00' (24-hour clock). Storing time alone is not supported—time must always be a component of a date.

To correct I would suggest creating a string(text) field type as it will allow the format you are seeking of MM/DD/YYYY.

Related Question