How To: Change the data type of an existing field
In some cases, attributes are stored in fields of a specific data type with limited capabilities. For example, math functions cannot be performed on Text fields because integers do not store decimals. A field of type Short cannot contain decimal numbers or whole numbers larger/smaller than 32,768/-32,768. For more information, read ArcMap Help: ArcGIS field data types.
While it is not possible to change the data type of an existing field, the same results can be achieved by transferring attributes from one field/data type to another desired field/data type.
To do this in ArcMap, refer to the workflow provided below.
- Right-click the feature class of the field/table to be modified, and select Open Attribute Table.
- Create a new field. To do this, in the attribute table, click the Table Options button on the top-left, and select Add Field. Enter a name for the new field, and set the preferred data type and properties. Click OK.
- Right-click the new field and select Field Calculator. Click Yes if a prompt to do a calculation outside of an edit session appears.
- Transfer the data to the new field. Under Fields in the Field Calculator dialog box, double-click the name of the field containing the attributes to be transferred to the new field. Click OK.
Below is an example expression used to calculate the 'Zion_Code' field with values from the 'ZION_NO' field.
Zion_Code = [ZION_NO]
Note: When transferring attributes from a text field to a field with a numeric data type, the attributes must only have numbers, and no other characters except decimal points.
- The new field contains the data from the previous field, but stored as a different data type. Delete the old field, if necessary, once confirmed that the data transfer is successful.
If encountering further issues, refer to the web help documentation in the related links section below.
- ArcMap Help: Making simple field calculations
- ArcMap Help: An overview of table properties
- ArcMap Help: A quick tour of tables and attribute information
- FAQ: Should I be concerned about precision and scale settings when creating a new field in my attribute table?
- GeoNet: Field Calculator error on ObjectID = 0, which doesn't exist(?)