I'm working on windows application with C# and I want to calculate age (year) from today's date. Please help me!
Thanks in advance
Hi Benjamin Richards!
You can use this way!
// Get current date
DateTime today = DateTime.Today;
// Assing given date
DateTime bday = DateTime.Parse("12/05/1986 12:00:00 AM");
// Get difference between two date
int age = today.Year - bday.Year;