How to get only the date value from a Windows Forms DateTimePicker control?

前端 未结 9 1571
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-30 03:21

I\'m building an application with C# code.
How do I get only the date value from a DateTimePicker control?

9条回答
  •  一向
    一向 (楼主)
    2021-01-30 03:34

    Try this

    var store = dtpDateTimePicker.Value.Date;
    

    store can be anything entity object etc.

提交回复
热议问题