Dates automatically change from dd/MM/yyyy to MM/dd/yyyy in excel

Hi guys,

I am writing the current date into one of the excel files. I converted the system date to dd/MM/YYYY format and while writing into excel it gets converted into MM/dd/yyyy

I have already tried .toString(dd/MM/YYYY) and exact parse methods and it doesn’t work
Funny part is I tried splitting the date and merging them. But still the output doesn’t change for excel.
My system regional date is of format d/MM/YYYY.

Please suggest on how can I resolve this.

Thanks,
KJ

@kunalj,

Try changing the format in excel rows before pasting the values into the excel to the required format

or
paste the values as string… this will work

Thanks for your reply.
I have already set the format in excel to required format and also I pasting it as a string but still doesnt work.

Hi @kunalj,

I had similar issue before, the workaround I did is change the excel file format to Text before past the information.

If your bot create the excel file first then past information to the excel file, you can add some hotkey activities to change the format to Text after the excel file create, save the changes then start past data to excel file.

Hope it helps.

1 Like

Thanks @Allenliaw

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