Can anyone tell me how to convert date time column into string type in datatable using LINQ query?
Thanks in advance
Can anyone tell me how to convert date time column into string type in datatable using LINQ query?
Thanks in advance
Hi @Nisha_K21
dt.AsEnumerable().ToList().ForEach(Sub(row) row("DateColumn") = Convert.ToDateTime(row("DateColumn")).ToString("dd-MM-yyyy"))
Regards,
Is there any other way to do this? I didn’t find useful this.
Hi @lrtetala , I didn’t get could you please elaborate
Create a new column of string tupe and then use assign
Dt.Columns("New col").Expression = Convert([OldColumnName],System.String)
Cheers