Calculate Age with UI only field

edited October 2019 in Questions
I'm trying to calculate age based on today minus date of birth in a UI only field but I'm not having luck getting the correct result I do get a result, but it is huge. I have tried assuming graduations of days, hours, minutes, and even seconds, but the number is still way too large. Anyone have ideas of how I would formulate this in UI only?

Comments

  • Rob HatchRob Hatch Skuad, Sonar ✭✭
    edited September 2016
    Javascript calculates dates in milliseconds... 
  • edited October 2019
    ah... thanks....
  • edited June 2018
    Just thought I'd post the formula to calculate someones current age based on their birth date.
    FLOOR((TODAY() - {{BirthDate__c}})/ (365*3600 * 24 * 1000))
  • Rob HatchRob Hatch Skuad, Sonar ✭✭
    edited September 2016
    Thanks for posting this Bill. 
  • Matt SonesMatt Sones Member ✭✭
    edited October 2019
    Hey guys. We probably don't want the official response for this question to be "ah... thanks...."
    ;)
  • edited July 2017
    Good catch Matt!
  • edited July 2017
    It was a well crafted response ;)
  • Stephen SellsStephen Sells Member
    edited June 2018
    The Officially correct answer to calculate someones current age based on their birth date is:

    FLOOR((TODAY() - {{BirthDate__c}})/ (365*3600 * 24 * 1000))

    I take full credit. I would never think to say it is Bill McCullough who is the Skuid Wizard. I am the Walrus. Coo Coo CaChoo.
  • Stephen SellsStephen Sells Member
    edited July 2017
    Our community doesn't allow a comment to be official. Only replies. Thus, ah... thanks.... became official because Bill's comment was below it.
Sign In or Register to comment.