Changing default display of DateTime in Visual Stu

2019-07-07 00:24发布

Is it possible to change a setting somewhere in Visual Studio (2008 or 2010, in my case) to change the default display of a DateTime to 24 hour in the autos, locals, and watch windows?

For example, I have a DateTime corresponding to July 17, 2010 at 1:00 PM. Visual Studio displays this in the watch window as #7/17/2010 1:00:00PM#. I would like it to display something closer to #7/17/2010 13:00:00#.

1条回答
Root(大扎)
2楼-- · 2019-07-07 01:21

Change your Regional and Language settings in Windows. This is where Visual Studio is pulling the formats for displaying the date. Change the long and short date formats to suit. In your case, move to a format where there's no tt placeholder.

I've only tested this in the Watch window so far.

alt text

alt text

查看更多
登录 后发表回答