在asp.net中使用addmonths()方法c# [英] use of addmonths() method in asp.net c#

查看:340
本文介绍了在asp.net中使用addmonths()方法c#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我正在使用AddMonths();在现有日期添加一些月份的方法,如果现有月份不是12月,如果我想在12月添加1个月而没有添加月份,则正确添加月份。



如何在12月添加月份



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

推荐答案

以下工作正常:

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


这篇关于在asp.net中使用addmonths()方法c#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆