Click here to Skip to main content
15,797,721 members
Please Sign up or sign in to vote.
5.00/5 (1 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]

You can find lots of stuff on how to work with DateTime.

Share this answer
Share this answer
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.

Share this answer

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900