Convert Date

Convert Date

This function should take a date string in the format dd/mm/yyyy and convert it to the format yyyy-mm-dd. If the input is not in the correct format, the function should return an error message "Error: Invalid date.".

example

Input: String (str).

Output: String (str).

Examples:

assert convert_date("25/12/2021") == "2021-12-25"
assert...
You should be an authorized user in order to see the full description and start solving this mission.