My system short date time format is d/M/yyyy. I'm passing "03/29/2011 02:38:18 PM", so it is giving error "String was not recognized as a valid DateTime"
DateTime.Parse("03/29/2011 02:38:18 PM")
If date time format of machine is set to m/d/yyyy, it works perfectly.
Edit: My application is a winform application, it contains a data gridview, this grid view contains a custom DateTime control (columns), which is created by other developer. This error is occurring when I try to change value of this datetime column in grid. VS debugger is not catching the exception, so I'm not able to find location where I should try fixing it.
Thanks