This can be done with an Excel formula. If you have more than two date formats to deal with, add one "type" code for each format and expand the formula discussed below
Assumptions:
I assume you read the dates from various datasets, write them to a text file (CSV file), then open the CSV file with Excel. I assume all the dates in any one dataset are in the same format, all either dd/mm/yyyy or mm/dd/yyyy. When you write the dates from one dataset to a CSV file, I assume you can format them so that the day and month values have leading zeroes so that all dates are always 10 characters wide. I assume that when you write the dates from one dataset to a CSV file, you can include additional text identifying the date format (see recommendations)
Recommendations:
Important: when you write a date to a csv file, include an apostrophe as the first character. This ensures that Excel interprets them as Excel text and not Excel dates. The formula I provide will cast your text data as dates
- When you read a dataset that has dates in the format dd/mm/yyyy, write each date to a line in the CSV file like this:
TYPE1,'dd/mm/yyyy
- When you read a dataset that has dates in the format mm/dd/yyyy, write each date to a line in the CSV file like this:
TYPE2,'mm/dd/yyyy
After you've created all the CSV files, concatenate them into 1 CSV file
Open the CSV file from step 3 with Excel. Column A will have either TYPE1 or TYPE2. Column B will have all the dates (in text format because of the apostrophe you added).
On the first row that has a date (assuming row 2 for this example), in column C, enter this formula:
=IF(A2="TYPE1",DATE(RIGHT(B2,4),MID(B2,4,2),LEFT(B2,2)),DATE(RIGHT(B2,4),LEFT(B2,2),MID(B2,4,2)))
copy and paste this cell downward for all rows. Column C will then show all dates in the format mm/dd/yyyy
See screen shot
excel sheet with formula