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

Last Reply 5 months ago By pandeyism

Posted 5 months ago

HI

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

Thanks

Posted 5 months 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.

Posted 5 months ago

HI,

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 Asp.net , provided link is for winforms 

Regards



Posted 5 months ago

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

thank you