Question: Write and test a function reformat _ date that takes three strings: a date string, an input date format, and an output date format. This

Write and test a function reformat_date that takes three strings: a date string, an input date format, and an output date format. This function should return a new date string formatted according to the output date format.
A date string is a non-empty string of numbers separated by /, such as "2/20/1991" or "1991/02/20". The order of date fields (month, day, year) will depend on the date format, and the number of digits for each field can vary but there must be at least one digit for each field.
A date format is a non-empty string of the date symbols "D","M","Y" separated by /. Assume the date string will match the date formats (share the same number of /s), that any date symbol in the output date format will also appear in the input date format, and that date formats do not duplicate date symbols.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!