If my string is 26/01/2011 00:14:00
but my computer set United state format (AM:PM)
How to convert my string into Datetime?
I try Convert.ToDateTime() but it cause error.
If my string is 26/01/2011 00:14:00 but my computer set United state format (AM:PM)
Share
As the others have said, you can use DateTime.TryParseExact, but you also seem to have a European culture format in your date. It might not hurt to make an attempt to use that to perform the conversion: