Any difference between DateTime.Parse and Convert.ToDateTime?

Per an answer on another forum from Jon Skeet…

Convert.ToDateTime uses DateTime.Parse internally, with the current
culture – unless you pass it null, in which case it returns
DateTime.MinValue.

If you’re not sure string is a valid DateTime, use neither and instead, use DateTime.TryParse()

If you’re sure the string is a valid DateTime, and you know the format, you could also consider the DateTime.ParseExact() or DateTime.TryParseExact() methods.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)