More

Converting column with data type string to double using ModelBuilder?

Converting column with data type string to double using ModelBuilder?


I am using ModelBuilder to create a tool. In the middle I have to convert the string values of two columns of a data (in attribute table) to double (for calculations in later steps).

Can I do this using ModelBuilder itself rather than doing it manually?


In ModelBuilder, "add a new field" to store the double value for each column. Set the new field as double. Then add "field calculation" to the model where the new field = the old field.

In the end you will have the two old fields in string, and two new fields in double.

You could go a step further and add "delete columns" to the model to delete the string columns once the conversion has been made.


Watch the video: Convert String to Double in C#