Date vs DateTime

后端 未结 12 1680
暖寄归人
暖寄归人 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 05:59

    For this, you need to use the date, but ignore the time value.

    Ordinarily a date would be a DateTime with time of 00:00:00

    The DateTime type has a .Date property which returns the DateTime with the time value set as above.

提交回复
热议问题