How to convert date format in a string

Hi All, Happy Christmas, I am trying to convert from “jan/02/2019” to 02/01/2019. But i am not getting the right result. My output was 02/0019, month is not converting to the numbers.
below is my piece of code. Could you please help me with this.

Convert.ToDateTime(pragnya).ToString(“dd/mm/yy”)
(pragnya is the variable i have created to store the values)
image

1 Like

Hi,

Try this

Thanks

3 Likes

Hi
Welcome to uipath community
You were almost done

Your expression is correct but instead of lower case mm use upper case MM

As mm is for minutes and MM is for Month
Like this
.ToString(“dd/MM/yyyy”)

Cheers @manojprabhakaran

1 Like

Many thanks mate.

1 Like

Many thanks mate, all good

1 Like

Cheers @manojprabhakaran

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