Display age on profile page

Looking to get the “Date of Birth” field from the members profile and place it in two place, at the top of the profile page under the user name and on the members directory. I also need to display the age and not the date. Any ideas about how it do this?

I know this is an extremely old thread but as Buddypress is linking to it for tips and tricks, I figured this is still relevant.

@sbrajesh, I used your snippet for adding age into my users’ profiles and it worked to the extent that I somehow made the admin, me, the default age. It looks great, but all my hypothetical users are 33! This seems like a placement issue but I can’t figure it out.

I’m using the latest WP and BP Default with a child theme, and I placed the first part of sbrajesh’s code in my bp-custom.php and the second part in the members-header.php to start with.

Actually, whoever is logged in is the default age, and when logged out, everyone is age 0 in the member directory. When logged out each user’s profile page shows their proper age.

Like I said, I think I just placed either the first part of the code or this “usage” snippet in the wrong place, but I think some kind of “loggedout” verbiage is still needed. One of you wizards please help me.