Join Datatables with Mismatched Data Types

I have two Excel workbooks. The first workbook (Wbk1) contains 1 sheet (Sheet1) with the following data

Date            Value
04/01/2019      33

The other workbook (Wbk2) contains a similar sheet (Sheet1) with the following data

Date              Value
4/1/2019          33
4/2/2019          29

When I output this table in a UIPath message box it shows the dates as DateTimes like this:

Date                      Value
4/1/2019 00:00:00         33
4/2/2019 00:00:00         29

The problem is when I do a Join Data Tables activity using the Date column, it doesn’t find any matches which I believe is because the data types are different. In other words, it’s not able to match 04/01/2019 with 4/1/2019 00:00:00

Before you say something like “why don’t you just format the Excel sheets?” - I can’t do that because the first excel sheet is downloaded from the internet, then I pull the data into a datatable in UIPath, and then when I write it back to the second Excel sheet, UIPath changes the data type even though I have “Preserve formatting” checked.

Is there a way to change/control the data type when or after I import the tables so that the join is able to work correctly?


You can remove the time value 00:00:00 from that “Date” column before joining the data tables.


So it will give only date …

Is that something I would do in an Assign activity? Or possibly Read Range?

Do this for the Date column , using assign activity. Then Date column results with only date.