Calculate difference between two dates in years and months using C# and VB.Net in ASP.Net

Last Reply one year ago By pandeyism

Posted one year ago


Hope you are fine ,

i am looking for a code form which i can extract diffrence from two dates in years and in months 

lets suppose that :

first for From : user selects 7/3/2000

second for TO: user selects 7/3/2019

it generate difference like this in another textbox, which looks like 18 years, 11 months


Posted one year ago

Posted one year ago

i am waiting for your kind reply as soon as possible , because i have to submit my project and give demo 

thank you

Posted one year ago

I will get back soon.

Posted one year ago


Thanks for your feedback, i review the link you provided, but it is not which i am looking , i am looking to calculate difference in years and months , provided link shows difference in days . secondly i want in , provided link is for winforms 


Posted one year ago
Hi @risingtale,
Please try the following

Calculate difference between two dates from DateTimePicker using C# in Windows Forms Application

It might help you.

Cheers Andrea.