Date Calculation
I need to know onething. Suppose, date is October 1 2008 (1.10.2008). If 30 days is added to that date then the result will be 31.10.2008. How could I do this automatically using c#.net.
I need help regarding this problem
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Ashley ArgilePosted Oct 22, 2008, 4:25 PM
DateTime date = new DateTime(2008, 10, 1);
date = date.AddDays(30.0);
If you want to specify the date in plain text you can do it like this:
DateTime date2 = DateTime.Parse("October 1 2008");
Regards
Ashley.
p.s.
If you need a bit more detail then please don't hesitate to ask.
Shomen DebPosted Oct 23, 2008, 1:43 AM