Unable to paste dat as it is

Hello,

I have date in below format in column I1 , i need to copy that and need to paste in all rows of column J.

I am using read cell to copy value from I1 with variable type as generic value.
when it is pasting in column J it is pasting like below.

i want to paste as it is .
how ca i achieve that dont need that 00:00 aslo.
help me on same.

Hie @Mathkar_kunal you can do this with many option one of and the simple option is use format cells activity.and other method is read the value of the cell save it into the variable use the datetime parse method and set it to your format .
cheers Happy Automation

yes can you please update me that date pase method .
My varible name is datevalue.

please give me that method.

i’ll give you a same xaml check if help to you .
BlankProcess5.zip (136.3 KB)

cheers

okay first let me know where you get your value? are you get it from excel using get cell activity ? and if yes then it store in string type.

cheers

Hey @Mathkar_kunal here the method

DateTime.ParseExact(yourValue, “dd/M/yy”, System.Globalization.CultureInfo.InvariantCulture).ToString(“dd/MM/yyyy”)

i am getting below error

“string was not recognized as valid date time” for write cell.

i am using below expression
DateTime.ParseExact(DateValue, “yyyy/mm/dd”, System.Globalization.CultureInfo.InvariantCulture).ToString(“dd/MM/yyyy”)

as my date is like 2025-01-08 which needs to be copy.

Hie @Mathkar_kunal you get this error because in the parse method you put the wrong format as input this is your format 2025-01-08 and in parse method you pass like this yyyy/mm/dd so thats why it throw error the two error you are doing is

1- the parameter
2- is month

Pass this logic in your code

DateTime.ParseExact(yourValue, “yyyy-dd-MM”, System.Globalization.CultureInfo.InvariantCulture).ToString(“dd/MM/yyyy”)

cheers

Hi @Mathkar_kunal

In read cell activity try using preserve format option by ticking the checkbox in read cell properties. And then write in your output file.

Thanks!!