I am wanting to calculate the number of years between two dates, but only for certain cases. If I use the date and time wizard and use the “calculate the number of time units between two dates” option, it works fine but it will just calculate for everyone, I can’t select the cases I want.
And if I use the Transform - “Compute Variable” option, I can select only the cases I want, but I do not know what expression I need for what I want to do. If I try to calculate the time by subtracting one date from the other as I would do in the date time wizard, I get an answer like 26.10.2012-14.07.1989 = 26.01.1606, rather than 23.3 years.
Thank you for any help!