Issue in Date Conversion using ToString

Hi All,
I’m trying to read an excel data ‘0/01/1990’ which is in Date format in the excel. When it is converted in code using row.Item(“Column Name”).ToString , it is reflected as ‘12/30/1899’ .
Why??? Please help. :slight_smile:

Thanks and Regard,

Hi @souravmaz,
can you please attach the excel file.
If it is excel confidential please check the given format in excel (correct or not).



I assume date value in your excel is incorrect(‘0/01/1990’) so excel takes it as an zero date value(‘12/30/1899’).

Try to run the code after changing the value to “01/01/1990”

1 Like

@ranjith, that’s correct, when the incorrect date(0/01/1990) is written in the column contains DateTime format, it is considering as the date as 12/30/1899 when we use read range to read the excel in UiPath.
But I’m surprised why.
Note, this incorrect date is part of QA testing, so, QA team is assuming the script is unable to handle the incorrect date. But it is an auto conversion happened when reading the excel.
Fix Implemented: Changing the excel column format from DateTime to Text.


1 Like