How to convert "01/02/19 " to "02-jan-2019" in UIPATH

how to convert date “01/02/2019” to “02-jan-2019”…can any one help in this case please?

Hi Saneeth,

Please use this code if your input date is string format.

DateTime.Parse(input_date_in_string).ToString(“dd-MMM-yyyy”)

or

DateTime.Parse(“01/02/2019”).ToString(“dd-MMM-yyyy”)

Thanks!

2 Likes

TANQ so much…but how can i take this output and store it as variable?..iam new to uipath

Hi,
just use “Assign” activity placing your code in the right field, like in the example shown below. In the left field create your variable e.g. via ctrl+k.

4 Likes

SO MUCH TANQ FOR YOUR KINDLY REPLY…I GOT IT

No problem at all, if you have any more questions, just let us know :slight_smile:

2 Likes

If you are still having an issue, please use the below code

Datetime.ParseExact(“01/02/19”,“MM/dd/yy”,system.Globalization.CultureInfo.InvariantCulture).ToString(“dd-MMM-yyyy”)

2 Likes

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