Excel: Data goes from dd/MM/yyyy to MM/dd/yyyy

Hi everyone !

I have a problem writing a datatable in an Excel file.

Just before the Excel Application Scope / Write Range I have a Show datatable with the date in dd/MM/yyyy
image

But then, when I open the Excel file I have

image

The of the datatable is ‘Object’, even with ‘Change column datatype’ and the fomat of the Excel column is ‘Date’

Any idea on why the format change when we write the datas and how to fix it ?

Thanks in advance !

Hi @Geoffroy_Pantegnies ,

This isn’t exactly something that UiPath does, but its how Excel formats dates by default.
If you want to change that:

image

Kind Regards,
Ashwin A.K

Hello Ashwin ! Thanks for answering.

I’ve done that but nothing has changed with the result.

Hi @Geoffroy_Pantegnies ,

That is odd, because I was able to achieve it like so:

image

Kind Regards,
Ashwin A.K

This is something related to excel.

You could try to convert all the column to Date again. In excel, select you column, go to Data tab > Text to Column > Delimited > TAB > At this point you should see a “Column Data format”, choose Date format.

Worst case scenario: Try to change date format in windows to MM/dd/yyyy.

The problem is when writing the datas, maybe the Excel think it’s in the right format so doesn’t change it ?

1 Like

Nice idea to switch the date format in windows, but unfortunatly that will add even more issues :stuck_out_tongue:

1 Like

Hello @Geoffroy_Pantegnies,

How are you assigning the date variable to the datatable?

I mean, maybe you need to put sth like: CDate(myvar).tostring(“dd/MM/yyyy”)

Hey Angel,

I tried evey date format I found on the forum but nothing worked.

The solution I’ve found is to put the datas on a new Excel file and then ffrom this one I apply a new assign.
I did the same thing as before but with a transition it seems to work.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.