c# - Convert DateTime -


this works:

testdatetime = datetime.parseexact("16/10/2010", "dd/mm/yyyy", null); 

this not:

string somedate = "16/10/2010"; testdatetime = datetime.parseexact(somedate, "dd/mm/yyyy", null); 

why??

both code snippets absolutely equivalent , should work/not work same. suspect value of somedate variable not think inside application. try debugging.


Comments

Popular posts from this blog

silverlight - Applying a style to ItemContainerStyle in C# -

c# - NullReferenceException in MySqlClient.NativeDriver -

php - Updating recent updates - Problem in procedure - Any other approach? -