DATE DIFFERENCE
ASP.NET
3
Posts
3
Posters
0
Views
1
Watching
-
How to find how many years,months,dates in two different dates format dd/mm/yyyy eg 01/06/2001 to 11/06/2006 ouput:5 years,0months,10 days parthiban
in C#?
DateTime dt1 = new DateTime(2001,6,1); DateTime dt2 = new DateTime(2006,6,11); TimeSpan ts = dt2.Subtract(dt1);
TheTimeSpan
class has propertiessuch as "TotalDays" which will give you the info you want. Current blacklist svmilky - Extremely rude | FeRtoll - Rude personal emails | ironstrike1 - Rude & Obnoxious behaviour -
How to find how many years,months,dates in two different dates format dd/mm/yyyy eg 01/06/2001 to 11/06/2006 ouput:5 years,0months,10 days parthiban