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".

Example Input: 06/02/1897, input_format=mm/dd/yyyy
Example Output: 02/06/1897

Example Input: 13/04/1905, input_format=dd/mm/yyyy
Example Output: 04/13/1905

Example Input: 07/11/1677, input_format=dd/mm/yyyy
Example Output:
11/07/1677