Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Convert Date by Pactp
import datetime
def convert_date(date: str) -> str:
try:
date_obj = datetime.datetime.strptime(date, '%d/%m/%Y')
return date_obj.strftime('%Y-%m-%d')
except:
return "Error: Invalid date."
Oct. 3, 2023
Comments: