Calculate Years, Months, weeks and Days

后端 未结 7 1061
南笙
南笙 2020-12-10 07:19

In my application, a user enters two dates. A scheduled start date, and a scheduled end date. We have to take those dates, and populate 4 fields, based on the difference.

7条回答
  •  囚心锁ツ
    2020-12-10 08:08

    Investigate the C# TimeSpan structure. It doesn't do months or years, but it does do days. That makes things easier.

提交回复
热议问题