Skip to:
Content
Pages
Categories
Search
Top
Bottom

Convert DOB to Age


  • ma3ry
    Participant

    @ma3ry

    Can anyone tell me how to convert DOB to Age without using the bp xprofile fields plugin.

    I have found several snippets to add to functions.php but none work for me.

    Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)

  • VibeThemes
    Participant

    @vibethemes

    This is inbuilt. Edit the profile field you are using and change this setting. No code or snippet required
    https://prnt.sc/uugjtj


    ma3ry
    Participant

    @ma3ry

    This is positively brilliant! Thank you for sharing.

    I don’t suppose you would know how to remove “ago” or even the number of months?

    The documentation link was moved to formatting date and time in general settings and there is nothing about time elapsed.

    I tried a few custom options but couldn’t get it right.

    Thank you.


    epgb101
    Participant

    @epgb101

    Hey anyone – how would I make the custom field date format selector setup show just “Age” – and not “Age years old”? eg. 20 and not 20 years old.

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Skip to toolbar