Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to get the user registered date and the years old

  • @anonymized-8418620

    Inactive

    Hi guys, ok?? I’m looking for a php code to get the date who the members were registered. Ex.: if a member was registrated 01/20/2012 the text will show “January 01, 2012” or another thing similar. I’m looking too for a code do get the years old of an user based on the year date of the dates field. If a member selected the year 1994, the php text will show “18 years old”. Can you help me, please?? Thanks!! Hugs!!

Viewing 6 replies - 1 through 6 (of 6 total)
  • @modemlooper

    Moderator

    Google it. It’s been asked here before. You can convert date to age with php

    @anonymized-8418620

    Inactive

    @modemlooper Hello, I really appreciate your work and your plugins, I use almost all, are very good, congratulations. But his answer sounded gross. I googled but not found. I can have researched the wrong terms, I don’t know. If you found, pass the link to me. The big problem that I am beginner in php and can’t do anything that I know are thinking. Could you help me? Thank you! Hugs guy!

    @modemlooper

    Moderator

    @rogercoathup

    Participant

    Take a look at this — you get the information from the basic WordPress user data:

    https://wordpress.org/support/topic/user-registration-date

    Remember to replace the user ID appropriately in the function I give

    @anonymized-8418620

    Inactive

    Thanks guys, thanks to help me! Still have not tested the codes, but when I try, I will come back here and give my positive feedback. From what I saw, the code works without problems. I love this team! Hugs!

    @anonymized-8418620

    Inactive

    Thanks staff, all codes operate without problems. I like this team! @modemlooper Sorry if I left you angry, it was not my intention. @rogercoathup I changed one part of your code to work with anyone user and not just one:

    echo date(“M Y”, strtotime(get_userdata(bp_displayed_user_id( ))->user_registered));

    Bye, hugs!!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How to get the user registered date and the years old’ is closed to new replies.
Skip to toolbar