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)
Loading
VulpesPosted Jun 9, 2012, 6:59 AM
My suspicion is that it is in fact working but there is some other code which is setting it back to DateTime.Now.
I'd try single stepping after that line is executed in the debugger to see whether that could be the case.
ThomasPosted Jun 11, 2012, 4:08 PM
thanks I knew I was missing something.