By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,251 Members | 2,760 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,251 IT Pros & Developers. It's quick & easy.

How can calculate form present date to Expdate by adding days/months?

P: 37
Hi,

I need to calculate the Expire Date by adding of days/months in c#.
For Example: I give present date as 08-03-2011, and i gave period of time as 3 months then i need the 09-06-2011.



Advance in Thanks,
venu
Mar 17 '11 #1
Share this Question
Share on Google+
1 Reply


GaryTexmo
Expert 100+
P: 1,501
Have a look at the DateTime class: http://msdn.microsoft.com/en-us/libr....datetime.aspx

Specifically, the AddMonths method should help you out. Let me know if you have any troubles :)
Mar 17 '11 #2

Post your reply

Sign in to post your reply or Sign up for a free account.