I want to remove 0 from the string. I want it like 2 but not 02. Moreover, these are dynamic values in a date format.
Eg. I want the date as 11/2/2020
I want to remove 0 from the string. I want it like 2 but not 02. Moreover, these are dynamic values in a date format.
Eg. I want the date as 11/2/2020
Try Formatting the date using the ToString(“date format”)
The list of formats on this page will be useful:
You can try this in invoke code activitiy after reading the datatable and storing in dt1 using read range activitiy
(Make sure to tick the preserve format in the read range activitiy)
dt1.AsEnumerable().ToList().ForEach(Sub(row)
row (“Date”)=DateTime.ParseExact(row(“Date”).ToString,“MM/dd/yyyy”, System.Globalization.CultureInfo.InvariantCulture).ToString(“MM/d/yyyy”)))
Hope it helps
Mark it as solution if it resolves ur query
Regards
NIVED N
Happy Automation
Hi …@NIVED_NAMBIAR …I guess the .tostring should be MM/d/yyyy instead of MM/dd/yyyy. Right?
thank you for your help but it is saying closing bracket expected
There is an extra bracket too which I had forget to.put
You can check my above response
Hope it helps you
Regards
Nived N
Happy Automation