Date vs DateTime

后端 未结 12 1702
暖寄归人
暖寄归人 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:58

    There is no Date DataType.

    However you can use DateTime.Date to get just the Date.

    E.G.

    DateTime date = DateTime.Now.Date;
    

提交回复
热议问题