In this task, you are given a date in a particular format and you need to convert to another format. If given format is "dd/mm/yyyy" then convert to "mm/dd/yyyy". If given format is "mm/dd/yyyy" then convert to "dd/mm/yyyy".

12/15/1704, input_format=mm/dd/yyyy
15/12/1704

02/23/1608, input_format=mm/dd/yyyy
23/02/1608

10/24/1640, input_format=mm/dd/yyyy

24/10/1640