Click here to Skip to main content
12,699,367 members (32,595 online)
Rate this:
Please Sign up or sign in to vote.
See more: C# ASP.NET

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 16-Dec-12 20:15pm
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?
Milind_T 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

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

Solution 1

The following works fine :
DateTime.Now.AddMonths(1); // 2013-01-17

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170118.1 | Last Updated 17 Dec 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

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