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

前端 未结 9 1550
爱一瞬间的悲伤
爱一瞬间的悲伤 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:38

    You mean how to get date without the time component? Use DateTimePicker.Value.Date But you need to format the output to your needs.

提交回复
热议问题