Use the function DateDiff to calculate an individual’s exact age based on birth date. DateDiff first calculates the total number of days an individual has been alive and then divides by 365.25 to account for leap years. The Int function truncates the division results by removing the decimal and not rounding:
Function CalcAge(datEmpDateOfBirth as Variant) as Integer CalcAge = Int(DateDiff("y",datEmpDateOfBirth,Date())_ /365.25)End Function
Charlie has over a decade of experience in website administration and technology management. As the site admin, he oversees all technical aspects of running a high-traffic online platform, ensuring optimal performance, security, and user experience.























