Hi Team,
today’s query is that I have a column which contains some date like format dd-MM-yyyy
now I have to convert that whole column in specific date format using linq.
required format : MM/dd/yyyy
pleae help me because this process already running in production.
lrtetala
(Lakshman Reddy)
2
Hi @Lakshya_Garg2
Use this in Invoke Code activity
dt.AsEnumerable().ToList().ForEach(Sub(row) row("DateColumn") = DateTime.ParseExact(row("DateColumn").ToString(), "dd-MM-yyyy", System.Globalization.CultureInfo.InvariantCulture).ToString("MM/dd/yyyy"))
Regards,
pradeep931
(Pradeep Bandharam)
3
Hi @Lakshya_Garg2
Please refer the below thread
singh_sumit
(Sumit Singh Tariyal)
5
Hie @Lakshya_Garg2 use this method
input

process

inside for each use this to store the column value

and use this logic to converted your date time
in the last on the code change (“yyyy-MM-dd”) to (“MM/dd/yyyy”) so you get your desired output
cheers Happy Automation
Hi,
thanks for the help but this is not working
lrtetala
(Lakshman Reddy)
7
@Lakshya_Garg2
Can you please share the sample excel file
Regards,
Samplefile.xlsx (15.8 KB)
please find attached sample file
I try this solution and let you know, is it working or not
1 Like