View Full Version : Calculate Member Average Age?
rex_b
01-17-2005, 04:17 PM
I think this would be a fun hack for a simple stat.
Anybody know how?
AN-net
01-17-2005, 04:22 PM
well first you would have to query the database for all users with a birthday. then convert the xx/xx/xxxx to a unix timestamp then divide that by the number of seconds in a year and then add the year to variable. once all the ages are added to a variable then divide the variable by the number of users found having a birthday;)
rex_b
01-17-2005, 04:28 PM
Oh geeeese. How about someone just convert this hack:
https://vborg.vbsupport.ru/showthread.php?t=33610&page=1&pp=15&highlight=User+Ages
It's only 1 file :)
Andreas
01-17-2005, 04:44 PM
SELECT AVG( YEAR( CURDATE( ) ) - YEAR( birthday_search ) ) - ( RIGHT( CURDATE( ) , 5 ) < RIGHT( birthday_search, 5 ) ) AS avgage
FROM user WHERE birthday_search NOT LIKE '0000-%'
TCattitude
01-28-2005, 07:39 PM
Oh geeeese. How about someone just convert this hack:
https://vborg.vbsupport.ru/showthread.php?t=33610&page=1&pp=15&highlight=User+Ages
It's only 1 file :)
WOW
That would be great!
Can anyone do it? :S
Marco van Herwaarden
01-28-2005, 08:48 PM
WOW
That would be great!
Can anyone do it? :S
Lol,
Read Kirby's post above yours, he already did it more then 10 days ago!
sabret00the
01-28-2005, 08:52 PM
w00t mines 22 lol
tpearl5
06-27-2005, 05:02 PM
ah cool... 25 for me.
agiacosa
09-10-2006, 10:45 AM
I don't think Andreas converted the mod. He just gave the query to get the average age. Anyone willing to convert the mod?
IvyKeepMommy
05-16-2008, 09:52 PM
Mine's 32.0978 :)
Boofo
05-16-2008, 10:09 PM
Mine is 35. something.
benstillman
08-16-2010, 04:26 PM
35.7600
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.