trilogy33
Well-known member
I used to use this on my old board to return the average age of the membership:
But of course that isn't going to work on XF.
Has anyone got an alternative that works please?
Code:
SELECT format(year(now()) - avg(right(birthday, 4)) , 2) AS Avg_Age
FROM user
WHERE right(birthday, 4) > '0000'
Has anyone got an alternative that works please?