Click here to Skip to main content
14,668,470 members
Rate this:
Please Sign up or sign in to vote.
See more:
Helloo Experts!!

I want to calculate difference between two dates(Day) and display that differnce date like 12\02\09,
In short,
current date:12\02\09

Dispaly date;11\02\09

help me!! [sigh]
Posted

Rate this:
Please Sign up or sign in to vote.

Solution 1

You can find lots of stuff on how to work with DateTime.
Check http://www.dotnetspider.com/forum/164678-date-difference-using-asp-net.aspx[^]

   
Rate this:
Please Sign up or sign in to vote.

Solution 2

   
Rate this:
Please Sign up or sign in to vote.

Solution 3

you can try this,

DateTime d1 = DateTime.Today;
DateTime d2 = DateTime.Today.AddDays(1);
TimeSpan ans = d2.Subtract(d1);

If I didn't get your problem plz explain it.

   



CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100