troubleshooting Question

Calculating my Age by entering Birthday Date ?

Avatar of Ahmad Al Raeesi
Ahmad Al RaeesiFlag for United Arab Emirates asked on
Visual Basic Classic.NET ProgrammingVisual Basic.NET
2 Comments1 Solution10169 ViewsLast Modified:
Hi I am newbie in, and I want to create application can calculate age by entering Birth date
and the result give me how old am I + month. For example: if my birthday was in 11-9-1990 then
the result must be like this; 16 year old + 11 month.
I am using this code below:  "my code will give the result 17"
Dim Birth As DateTime = CDate(TextBox1.Text)
        Dim age As Long = DateDiff(DateInterval.Year, Birth, Today)
        Birth = Birth.AddYears(CInt(age))
        TextBox2.Text = age.ToString()   ' result
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 2 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros