Given a DateTime
representing a person's birthday, how do I calculate their age in years?
C# – How to calculate someone’s age based on a DateTime type birthday
cdatetimenet
Related Topic
- Mysql – How to set a default value for a MySQL Datetime column
- C# – How to convert a Unix timestamp to DateTime and vice versa
- Mysql – Should I use the datetime or timestamp data type in MySQL
- C# – Calculate days remaining to a birthday
- Python – How to increment a datetime by one day
- Python – How to convert a datetime to date
Best Answer
An easy to understand and simple solution.
However, this assumes you are looking for the western idea of the age and not using East Asian reckoning.