Why Robot change my date?

Hi Guys,

I’m seeking your help to advise me why my Robot change date from Excel File.

I sent Excel to Robot = 01/06/2022 (DD/MM/YYY). If I check as Number format, it is “44713” (1-Jun-2022)

Robot input date in Application = 06/01/2022 ). If I check as Number format, it is “44567” (6-Jan-2022)

I would like to know why it happen? and How i can solve it.?

Thanks in advance.

try this
DateTime.ParseExact(yourdatevariable.toString, “MM/dd/yyyy”, Globalization.CultureInfo.InvariantCulture)
.ToString(“dd/MM/yyyy”)
or this
DateTime.ParseExact(yourdatevariable.toString(), “MM/dd/yyyy”, Globalization.CultureInfo.InvariantCulture)
.ToString(“dd/MM/yyyy”)

assuming the robot recognize the input as string and read the date as mm/dd/yyyy
then we need to do this to change the date output

@Ahmad_Rais Thanks a lot for your advise.
Let me try it.

Hi @Gokion

Ty this below expression

DateTime.ParseExact(ColumnNameOrIndex,("MM/dd/yyyy"),Globalization.CultureInfo.InvariantCulture).ToString(“dd/MM/yyyy”)

Alternative Method

CDate(ColumnNameOrIndex).Tostring("dd/MM/yyyy")

MM/dd/yyyy is the Input Format
dd/MM/yyyy is the output format

For More Information about the Date Format

Regards
Gokul