parse any string to date in C# code example
Example: string to datetime c#
DateTime.TryParse(stringDate, out DateTime date);
//date variable type is DateTime
DateTime.TryParse(stringDate, out DateTime date);
//date variable type is DateTime