[英]How to get next month's date from the current date using asp.net
I am currently showing the current month but would like to show next month's date using the current date.我目前正在显示当前月份,但想使用当前日期显示下个月的日期。 Also i like to show the December month.
我也喜欢展示 12 月的月份。 Example: November - 2015 and also December - 2015. This is the current month:
示例:11 月 - 2015 年和 12 月 - 2015 年。这是当前月份:
<%=DateTime.Now.ToString("MMMM - yyyy") %>
Thanks谢谢
将当前日期加一个月。
<%=DateTime.Now.AddMonths(1).ToString("MMMM - yyyy") %>
<%=DateTime.Now.AddMonths(1).ToString("MMMM - yyyy") %>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.