I want it to know how to convert string field values to integer values in QGIS Dufour... there are numbers and strings in the same field, when I use
toreal(string) it stops and it won´t create the field.
I just tried to convert a string to an integer in QGIS Dufour with no issues. I had a text string that was 7 characters long. I did the following:
- Create a new field (temp2) that is a whole number and holds 10 characters (longer than my source)
- Field calculate temp2 with: toreal( "temp1" )
- Field calculate temp3 with: toint( "temp1" )
Both examples worked and produced numbers from text. Make sure you only have numeric values in the source field. If you have any alpha values (a - z) or special characters (* # $ _ etc.) the conversion will not work. The source field must only contain numeric values (0 -9)