I have two columns called "LC" and "LC Datum".
"LC" contains text value's like 2015, 2016 and so on. These are actually years and need to be converted/transfered to another column called "LC DATUM", where the text value will be a date year value.
When I try to go in the Attribute table into the Field calculator. And then into the Column "LC Datum" and try to set the expression "LC" in the "LC Datum" Column it gives the value NULL. This is strange because I clearly see a result of the execution in the calculator window. I assume I need to do an extra conversion of my data. But how do I do this?
Edit: As the last thing I also need to note that there are null value's in my LC column.
year("LC")could work?to_date(concat("LC", '-01-01'))and then (2) OpenLayer Properties | Fieldsand click on [Text Edit] to change the widget to Date/Time which allowscustomtoyyyyformat.to_date(concat("LC", '-01-01')withto_date("LC" || '-01-01')since you pretty much got it right :)