Answers for "how to fetch current age from date of birth in python"

7

python calculate age from date of birth

from datetime import date

def calculate_age(born):
    today = date.today()
    return today.year - born.year - ((today.month, today.day) < (born.month, born.day))
Posted by: Guest on April-17-2021
2

python calculate age from date of birth

#Python Calculate Age from date of birth:

from datetime import date

def calculate_age(born):
    today = date.today()
    return today.year - born.year - ((today.month, today.day) < (born.month, born.day))
Posted by: Guest on July-07-2021

Code answers related to "how to fetch current age from date of birth in python"

Python Answers by Framework

Browse Popular Code Answers by Language