DateTimePicker

  • Thread starter Thread starter Tony
  • Start date Start date
T

Tony

Hello!

I have a DateTimePicker in my form and I have set it back one day by using
this statement
this.stopTimeDateTimePicker.Value = DateTime.Today.AddDays(-1);
this work.

Now to my question
The problem is that the time is set to 00:00:00 but I want to have it set to
23:59:59

//Tony
 
Hello!

I have a DateTimePicker in my form and I have set it back one day by using
this statement
this.stopTimeDateTimePicker.Value = DateTime.Today.AddDays(-1);
this work.

Now to my question
The problem is that the time is set to 00:00:00 but I want to have it setto
23:59:59

//Tony

I am assuming you want the value to be one second before midnight on
the previous day. Just subtract one second instead.
 
Back
Top