Click here to Skip to main content
15,885,985 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi,

I am using AddMonths(); method to add some month in existing date, it add month correctly if the existing month is not December if am trying to add 1 month in December it didn't add month.

How can i add the month in december
Posted
Comments
Vani Kulkarni 17-Dec-12 1:25am    
Please elaborate. Your question is unclear. How does addmonth work for one date and does not work for another?
MT_ 17-Dec-12 1:27am    
It should come January ? What is your output ?
Pradeep_kaushik 17-Dec-12 1:28am    
it the same as is it no change is there

1 solution

The following works fine :
C#
DateTime.Now.AddMonths(1); // 2013-01-17
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



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