Todays date is given in 3 column want complete date in 4th column which activity I can use for it

Todays date is given in 3 column want complete date in 4th column which activity I can use for it
eg: Date month year expected result
28 2 2022 28/2/2022

Welcome @satish.rathi59,
Cell A1 contains 22, B1 contains 02, and C1 contains 2022 and you want to print the full date in cell D1?

Hi @satish.rathi59
Welcome to the UiPath Community!

You can use DateTime.ParseExact method to achieve this.

  1. Assign DateString = A1 + "/" + B1 + "/" + C1 (append the first three columns together)
  2. Assign MyDate = DateTime.ParseExact(DateString, "dd/MM/yyyy", CultureInfo.InvariantCulture)

You may choose not to add the / character, I added it for clarity/aesthetics. Whichever date format you prefer, make sure to use that in the second argument of ParseExact.
For example, if you pass DateString as A1 + B1 + C1, use format ddMMyyyy without any other characters.

Hope this helps.
Cheers.

3 Likes

Yes result in D1

@satish.rathi59 ,
@RPAForEveryone His comment will help you.

1 Like

How DateTime.ParseExact Method use.
Please help me to learn his method

Thanks for your quick reply

1 Like

Hi @satish.rathi59
Please use the link I provided in my previous reply (also quoted below). :slight_smile:

Yes sir I gone through but I am not getting exactly what this method says and How I implement in UI path studio

Hi @satish.rathi59

If you already have the day, month and year, try this:

Kind Regards

2 Likes

Thank you so much its working

great - kindly mark answer as solution.

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