2

I have a column of type string in the following form

23/02/2021

how can I either

a) convert this column to Date format

b) create a new column where each cell contains the value in valid date format?

QGIS 3.16

1 Answer 1

4

Using this expression in field calculator to create a new field, it works :

to_date( "string" ,'dd/MM/yyyy')

enter image description here

More info on the date formatting here :

https://doc.qt.io/qt-5/qdate.html#fromString-2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.