get just the year number of a date time

I have a stored field as datetime

I just want to pull the year number such as 2020

How to do?

I got this to work perfectly:timestampDIFF(YEAR,birthdate,NOW())BUT…I need to calculate the birthdate as 1/1/(of the year born)So 12-4-1962 is 57 Years old right now , but what I want is what will the oldest age that will be at during any part of 2020
so 12-4 -1962 becomes 1-1-1962 using timestampDIFF(YEAR,birthdate,NOW())So…how to change the Day and Mo to 1/1, leaving the year intact so this resolves

I finally went with this (MariaDB):UPDATE mytable SET age = YEAR(CURDATE())-YEAR(theBirthdate)It gives me what I needed, which is the person’s age if the date was 12/31 of this year.I hope this can help others.

mw4 wrote:

I finally went with this (MariaDB):> UPDATE mytable SET age = YEAR(CURDATE())-YEAR(theBirthdate)> It gives me what I needed, which is the person’s age if the date was 12/31
of this year.> I hope this can help others.

I could try adding CUSTOM FIELD EXPRESION: FLOOR(DATEDIFF(Now(), theBirthdate)/365)