In QGIS 3.6.1 Noosa I have a column in the attribute table (
Install Date) formatted as
DATE that I want to add 100 or 60 years (
Replacement Date) to, also in
DATE format, for use in Time Manager.
I have tried creating a new field in the Field Calculator but get NULL values out. Expression used was
I can get a result using Integer formats using
left(Install_Da,4) then another column adding 100 years but then it doesn't run in Time Manager due to wrong format.
What is the proper way to add years to a date?
You need to change the 60 or 100 years to an interval:
"Install_Da" + to_interval('60 years')