Excel date format is changing from dd/MM/yyyy to MM/dd/yyyy

Hello everyone,

The date is being read from excel (dd/MM/yyyy) is changed as MM/dd/yyyy in uipath.

For example, the date is 05/06/2022 (i.e 05 June 2022) that is converting as May 06 2022 in uipath.

Could anyone assist on this?

Thanks,
Meena.M

Hi @meena.m1

Have a look on the link

Regars
Gokul

1 Like

Hey!

Try this:

Datetime.ParseExact(CurrentRow("ColumnName").ToString, “dd/MM/yyyy”, System.Globalization.CultureInfo.InvariantCulture).ToString(“dd/MM/yyyy”)

Regards,
NaNi

Hi @THIRU_NANI,

I’m getting error that “String was not recognized as a valid DateTime.” Below is the expression I tried.

Datetime.ParseExact(CurrentRow(“Date of Birth”).ToString, “dd/MM/yyyy”, System.Globalization.CultureInfo.InvariantCulture).ToString(“dd/MM/yyyy”)

Thanks,
Meena.M

@meena.m1
try this →

Cdate(currentrow("date").tostring).tostring("MM/dd/yyyy")

Hey!

Which format we’re getting from the excel?

Could ou please change the formayt here according to the input date

The format you have to change here…

Regards,
NaNi

Hi @Vaibhav_Rajpoot_17 ,

Same output, i.e 05/06/2022 as May 06 2022

Thanks,
Meena.M

@meena.m1

use this expression->
it will give you the month name.
eg-July/29/2022

Cdate(currentrow("date").tostring).tostring("MMM/dd/yyyy")

@meena.m1

use "MMM/dd/yyyy" while conversion

hey @THIRU_NANI,

It worked now. My bad I had given wrong format.

Thanks,
Meena.M

1 Like

Thank you all for your time @Gokul001 @Vaibhav_Rajpoot_17 @THIRU_NANI.

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