Jump to content



Photo

Calculate Age From Dob


  • Please log in to reply
1 reply to this topic

#1 calcaterrasteve@gmail.com

calcaterrasteve@gmail.com

    Newbie

  • Members
  • Pip
  • 1 posts
  • OS:Windows 8
  • Total Memory:< 1Gb
  • Framework:v3.5
  • License:Professional Edition

Posted 04 January 2019 - 05:25 PM

I would like to be able to convert a Date of Birth to Age at a future date.  Stuck could use an assist. 

thank you



#2 pash

pash

    Advanced Member

  • Fellow UBotter
  • PipPipPip
  • 3251 posts
  • OS:Windows 10
  • Total Memory:More Than 9Gb
  • Framework:v4.5+, unsure
  • License:Developer Edition

Posted 05 January 2019 - 09:16 PM

you can use python or js or plugin

try search "javascript - Age calculation"

function calculateAge (birthDate, otherDate) {
    birthDate = new Date(birthDate);
    otherDate = new Date(otherDate);

    var years = (otherDate.getFullYear() - birthDate.getFullYear());

    if (otherDate.getMonth() < birthDate.getMonth() || 
        otherDate.getMonth() == birthDate.getMonth() && otherDate.getDate() < birthDate.getDate()) {
        years--;
    }

    return years;
}
var age = calculateAge("02/24/1991", "02/24/2010"); // Format: MM/DD/YYYY

or 

load html($plugin function("Advanced DateTime.dll", "$datetime age calculator", "08/13/1989 11:51:11", $date, "UBOT (MM/dd/yyyy HH:mm:ss)"))

New Plugin:: Advanced Facebook | Advanced Connection | Advanced Twitter | Advanced Email | Advanced PowerPoint
- Advanced Data Text File | Advanced DateTime | Advanced Dialog | Advanced Document | Advanced Google Blogger V3 | Advanced Google Drive | Advanced Google YouTube V3 | Advanced Image | Advanced Video | Advanced Screen and Windows | Advanced Systems | Advanced Ubot 1 | Advanced Ubot 2 | Advanced WordPress | Advanced Connection | Advanced Twitter | Advanced Email | Advanced PowerPoint

- Advanced Captcha (V3) | Advanced Captcha (V2) (Old) | Create Table From Excel (Lite) | Check Conection | Ubot Enter License | Auto Free Memory
- Working hours GMT+7. i regret sometimes the answer is delayed due to health problems.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users