DateTime convertedDate = DateTime.Parse(Date.ToString("yyyy-MM-dd"));
# convert string to date from datetime import datetime date_string = "2022-03-10 10:10:10" print (datetime.fromisoformat(date_string)) 2022-03-10 10:10:10