Why does DateTime.ToString("h") cause exception?

Viewed 3821

Open a watch window

new DateTime(2010,01,01).ToString("h")

Gives:

new DateTime(2010,01,01).ToString("h") threw an exception of type System.FormatException

Yet...

new DateTime(2010,01,01).ToString("h ")

Gives: "12 "

So why does an extra space stop this format exception from happening? Is this a bug?

1 Answers
Related