Format date from Excel file to DataTable

Hi, I have problem with column date.
Step of my job
1.Open excel , read range data to dataTable (DT)
2.I have to check column C is in format Date dd/MM/YYYY or not .
If It’s in correct format convert it to string variable (NewDate)
Logic to check format date is
FOR EACH ROW (DT)
IF DateTime.TryParse(Split(row(x).ToString, " ")(0).ToString,Out_date) = True
out_date = Datetime.ParseExact(row(3).ToString,“dd/MM/yyyy”,System.Globalization.CultureInfo.InvariantCulture)
NewDate = out_date.ToString(“dd/MM/yyyy”)

It’s work when date = 08/08/2020
but it has error when date = 29/10/2020

My point is collect value in column in format DD/MM/YYYY.
I can not default format dd/MM/YYYY or MM/dd/YYYY of data in excel but I have to keep it in format dd/MM/YYYY.

Please advise.

Hi @Supakinee_Navawong_na_ayu

You can try using the TryParseExact, here is the documentation

However, I would recommend you to check your process, the robot can have issues differentiating November 01 from January 11.

Regards,

Andres