Click here to Skip to main content
15,891,184 members
Please Sign up or sign in to vote.
1.00/5 (4 votes)
See more:
i need to implement calculation of age when the dob is entered.
Posted
Comments
Maciej Los 16-May-13 3:03am    
Have you tried something?
MuhammadUSman1 16-May-13 3:38am    
You want to compare with which value.
Manfred Rudolf Bihy 16-May-13 3:46am    
What programming language are you using?
How is your google-fu?

1 solution

You should have a look at the DateTime.Subtract[^] method. That method returns a Timespan[^] value.

The rest is up to you and I urge you: "Do yourself a favor and read the documentation!".

Cheers,

— Manfred
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900