Datetime not working

Hi Guys, i have the following issue:

whenever i try to read the datetime of a cel in an excel file the message box says the following “43373” instead of 01-09-2018. When i just put the words test in the cell it does say “test”. I did this via the following assign:

startDate = DT1.Rows(counter)(“Start date”).ToString

Ironically, it is working when i try the same assign on a different file.

any tips?

image

In excel, Change the Format as Text Type.

1 Like

Did you try Casting it to Date. cDateTime(yourstring)

Thanks,
Prankur

2 Likes