We can convert string to date format either by using CAST or CONVERT functions in the SQL server. Here are the examples to use CAST AND CONVERT functions to convert strings to date format:
SELECT CAST (’07-05-20’ as date) as String_to_date;
SELECT CONVERT (DATETIME, ’07-05-20’, 103) as String_to_date1;
SELECT PARSE (’07-05-20’ as date) as String_to_date2;
In the above SQL query using CONVERT function, 103 is a style number for a particular date format.
You can go through this SQL Tutorial to learn more about DateTime conversions.