Wednesday, December 12, 2007

Interesting/weird feature of DateTime.ToString()

I was playing around with localization when I encountered the following behaviuor: I set time & number format to "French (Canada)", and wrote:


I got:

Instead of "/" I got "-".

I was looking around and couldn't find any documentation saying '/' is a special character in DateTime format string. Finally I used the following string which worked just fine:


No comments: