Date Format changes automatically

Hy,

I have an Excel cell with “26/12/2019 13:46:37”, when I use the Read Range Activity it changes automatically to “12/26/2019 13:46:37”, and I dont want to do it!!

Is there anything I can do about it?

Hi @William_Blech_Sister,

This is a normal behavior because the date is still correct but the display format is different. You can change the display format to verify that the correct DateTime is read.

Please replace yourDateTimeVariable with your DateTime variable:
yourDateTimeVariable.ToString(“dd/MM/yyyy hh:mm:ss”)

2 Likes

read range has a Property Called PreserveFormat. please check this and try :

PreserveFormat(slower) - Selecting this check box keeps the formatting of the range that you want to read. By default, the check box is cleared.


Mukesh

1 Like