I am trying to change some DateTime data in a QuickWatch window. I have tried 1/29/2009, etc. but none of them seem to work. It just keeps going back to #12:00:00 AM#.
This simply doesn't work. Changing the value to #1/29/2009# results in a popup from Visual Studio stating "Unexpected character '#'"
David Morton
2009-01-28 22:40:22
It works for me in the QuickWatch window when editing the value of a DateTime object at run-time on Visual Studio 2005.
Joey
2009-02-03 22:23:38
A:
The Year/Month/Hour/etc fields in DateTime are immutable. You can't change them in QuickWatch. You can only change it by reassigning. Just change the value by constructing a new one. In other words, enter "new DateTime(2009, 29, 1)" in the Value section.
David Morton
2009-01-28 22:39:16