Problem when importing table with CV and Dates

HI, when I import a table using CV extraction I have an issue when the dates. I import a spanish table which always have format dd/MM/yyyy,

If the table has values which can be read as MM/dd/yyyy (for example 03/04/2020 which in reality is 3 of April of 2020) UIPath interpret like 4 of April of 2020. And has that column as datetime column.

But if I have another case where data is like 24/04/2020, UIPath will import it as a string, and it spanish it is 24 of April of 2020. How can I get UIPath always have that column as dd/MM/yyyy.

I was thiking creating an IF condition, that if the value was in datetime Format, convert it to string with a hack of changing the value (from MM/dd/yyyy to dd/MM/yyyy and then as string), and if it was a string, leave it like that.
Not sure how to evaluate that condition and create then another auxiliary column for that.

Hi @JavRR,
Form what I understand, both of your situations can be solved by a simple DateTime.Parse activity, where you pass the extracted string. Once done, this can be then written to a string in your desired format,i.e. dd/MM/yyyy

This is what I mean
DateTime.Parse(extracted_var.ToString).ToString(“dd/MM/yyyy”)

Let me know if this helps

Thanks,
Nishant

Hi @JavRR - Can you share that imported table in an excel sheet