Date vs DateTime

后端 未结 12 1698
暖寄归人
暖寄归人 2020-11-30 05:13

I am working on a program that requires the date of an event to get returned.

I am looking for a Date, not a DateTime.

Is there

12条回答
  •  南笙
    南笙 (楼主)
    2020-11-30 06:01

    Unfortunately, not in the .Net BCL. Dates are usually represented as a DateTime object with the time set to midnight.

    As you can guess, this means that you have all the attendant timezone issues around it, even though for a Date object you'd want absolutely no timezone handling.

提交回复
热议问题