Hello,
I would like to add a number of years on timestamp based on calculation.
Without calculation (fix number), I know how to do, using date.add and formula for below exemple add 1 year to ‘_time’
|> map(
fn: (r) => ({ r with
Year : date.year(t:r._time),
NB_Year : date.year(t: now()) - date.year(t:r._time),
New_Date : date.add(d: 1y, to: r._time),
}),
)
Now I would like to add years based on the result calculation of NB_Year.
What is the syntax I will have to use ?
I’m sure it is basic but I do not know the syntax to use.
Thanks in advance for your help.