General information
Category:
Coding, syntax & commands
Title:
What is best way to calculate age
Environment versions
Network:
Windows 2000 Server
We need totals of clients by age bracket. What is the best way to calculate the age? Right now, we are using:
INT((DATE() - a.dob) / 365)
But that doesn't take into consideration leap years (which could be significant for someone over 90 years old). Any suggestions? Should I just use:
INT((DATE() - a.dob) / 365.25)
Or is there a better (more accurate) way?
Thanks,
Doug
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only