I'm trying to convert DMS coordinate written as DD-MM-SS.SSS (ex. 17-42-35.244) in decimal, someone not human suggested me:
to_real(left("Field",2)) +
to_real(mid("Field",4,2))/60 +
to_real(right("Field",5))/3600
But QGIS says Expression is invalid
.
If I consider only converting Degrees/Minutes/Seconds to_real(left("Field",2))
without any other mathematical operation, I obtain some results.
What is wrong?