Changed Date format

Hi there, I am facing an issue while I writing the extracted date into excel, date format is change For e.g.
Array_variable = 04/08/2023 (This is an extracted date in array variable)
Ecxel shows = 08/04/2023 (After writing into excel through write range)
But if date is greater than 12 than there is no change For e.g.
Array_variable = 13/01/2023
Excel shows = 13/01/2023
How can I resolve this issue

Hi @Rajneesh_Kumar

Try This

DateTime.ParseExact(here_your_date.ToString(),"dd/MM/yyyy",Globalization.CultureInfo.InvariantCulture).ToString("MM/dd/yyyy")

and please add system.globalization in imports.

Cheers,

Hi
Other way is simply prefix single quote “'” for the value before writing to excel
It will be assumed as text and format remains same
Regards