Thomas

Thomas

  • NA
  • 111
  • 0

datetimepicker not adding hours

Jun 8 2012 12:08 PM
ok I have the following line of code and it does not appear doing anything and I'm not sure why or what I'm missing. SchedTransDate is a DateTimePicker and the 4 is actually a calculated value but even when I put in the straight number 4 instead of calcing it, the time stamp does not get updated properly

 SchedTransDate.Value = SchedTransDate.Value.AddHours(4);

instead it appears to just update the time stamp with the current time not the calculated time.

(basically if certain conditions are met I want to force the time stamp to be a certain time. However it does not allow me to just assign the time stamp (at least not in any way I can find)


Answers (2)