calcaterrasteve@gmail.com 1 Posted January 5, 2019 Report Share Posted January 5, 2019 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 Quote Link to post Share on other sites
pash 504 Posted January 6, 2019 Report Share Posted January 6, 2019 you can use python or js or plugintry 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)")) Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.