I'm storing a DateTime in XML to tell an applicaton when it will shut down. I intend to use the value of "01/01/0001 00:00:00" to mean that we have no shut down scheduled. On the form that will get and set this value I am using two controls, a DateTimePicker and a TimePicker, to work with the value. (I'm open to other options.)
You already taught me how to handle the DateTimePicker so I'm initializing that control like this:
dtpShutDown.NullDate = Convert.ToDateTime(
dtpShutDown.Value = Convert.ToDateTime(
I'm not quite there with the equivalent for the time picker. This gives me the "00:00 AM" text:
tpLogin.Value = Convert.ToDateTime(
I would like some way to just blank out the whole value.
I'm working with options while I wait for your response. A single DateTimePicker with a custom format to include the time may work out better than I had initially thought. (Regardless, I would like to know how to set the null time for the TimePicker.)