I read an excel file that has a date column. All the cells in this column are formatted the same, as in the screenshot below and windows date format is dd-MMM-yy
Whether you get all the date formats in the form of “MM/dd/yyyy HH:mm:ss” then use below code,
DateTime.ParseExact((in_DateColumnName).ToString.Replace(“-”,“/”),“MM/dd/yyyy HH:mm:ss”, Globalization.CultureInfo.InvariantCulture).ToString(in_SpecificDateFormat)
It looks like, although the date format is set for that column, some of the dates are numbers and some are text. That’s a strange thing related to Excel, I guess. I tested it using the formula IsNumber.
To solve this issue, in Excel I converted the dates using Data>Text to Column. After that all cells were numbers and UiPath read the table correctly.