how to compute age base on age; i do this code but it doesnt work;
int age;
DateTime bday;
DateTime cdate;
bday = DateTimePicker1.Value;
cdate = DateTimePicker2.Today;
age = cdate - bday;
Printable View
how to compute age base on age; i do this code but it doesnt work;
int age;
DateTime bday;
DateTime cdate;
bday = DateTimePicker1.Value;
cdate = DateTimePicker2.Today;
age = cdate - bday;
Have a look here.
remember thatCode:DateTime - DateTime = TimeSpan