Datatable column update using Foreach in lambda expression is throwing an error

Hi @ppr,

Thank you so much for your help. And sorry about the delayed post. Your xaml was working fine when I ran it individually but it was not working when i formed the datatable from excel source.

Not sure why, but only the below code seems to working for me -
DataTable.AsEnumerable().ToList().ForEach(Sub (r) r.SetField(Of String)(“Start time”, Date.Parse(r.Item(“Start time”).ToString(), CultureInfo.InvariantCulture).ToString(“M/d/yyyy”)))

I don’t think I would have been able to fix this without your help. So, thanks a ton for all your help!

1 Like