SyntaxFix
Write A Post
Hire A Developer
Questions
Try C# 7.0
var Dob= DateTime.TryParseExact(s: YourDateString,format: "yyyyMMdd",provider: null,style: 0,out var dt) ? dt : DateTime.Parse("1800-01-01");