G
Guest
Hi
I am having a problem formatting a string when the time is in format
hh.mm.ss - used in Europe
Parse seems ok when the date uses "/" or "." as seperator
but I get an exception when time uses "." as seperator as used in Europe
I have US regional setting and I have tried switching my regional setting to
Europe
with no luck
Any ideas on what I an doing wrong???
Thanks
DateTime dt = DateTime.Parse("10/10/2007" + " " + "12:10:00"); --> OK
DateTime dt = DateTime.Parse("10.10.2007" + " " + "12:10:00"); --> OK
DateTime dt = DateTime.Parse("10.10.2007" + " " + "12.10.00"); -->Problem
DateTime dt = DateTime.Parse("10/10/2007" + " " + "12.10.00"); -->Problem
Exception
String was not recognized as a valid DateTime.
I am having a problem formatting a string when the time is in format
hh.mm.ss - used in Europe
Parse seems ok when the date uses "/" or "." as seperator
but I get an exception when time uses "." as seperator as used in Europe
I have US regional setting and I have tried switching my regional setting to
Europe
with no luck
Any ideas on what I an doing wrong???
Thanks
DateTime dt = DateTime.Parse("10/10/2007" + " " + "12:10:00"); --> OK
DateTime dt = DateTime.Parse("10.10.2007" + " " + "12:10:00"); --> OK
DateTime dt = DateTime.Parse("10.10.2007" + " " + "12.10.00"); -->Problem
DateTime dt = DateTime.Parse("10/10/2007" + " " + "12.10.00"); -->Problem
Exception
String was not recognized as a valid DateTime.