Difference between System.DateTime.Now and System.DateTime.Today

后端 未结 8 1139
悲哀的现实
悲哀的现实 2020-11-28 19:23

Can anyone explain the difference between System.DateTime.Now and System.DateTime.Today in C#.NET? Pros and cons of each if possible.

8条回答
  •  我在风中等你
    2020-11-28 20:05

    DateTime.Today represents the current system date with the time part set to 00:00:00

    and

    DateTime.Now represents the current system date and time

提交回复
热议问题