Is there any easy way to increment a DateTime by monthly/yearly/daily units without having to parse it out like crazy?

前端 未结 4 1983
后悔当初
后悔当初 2020-12-20 22:08

I need to set up billing cycles and process payments. So for example I will process a payment immediately and then set the next one up to process exactly one month from then

4条回答
  •  暖寄归人
    2020-12-20 23:01

    If you ever need to work with Quarter or WeekOfYear, Microsoft.VisualBasic.DateAndTime.

    http://msdn.microsoft.com/en-us/library/microsoft.visualbasic.dateandtime_members.aspx

    Otherwise, System.DateTime does everything you would typically need.

提交回复
热议问题