I have a data table that contains dates in a format of yyyymmdd. I would like to add a datetime column to the table that contains the date value of that column.
Now the problem is that the table contains a lot of records and looping through all the records takes some time. Are there a way to do a bulk update or a use the Expression as from this post?
Something like:
table.Columns.Add("MyDate", typeof(DateTime)).Expression =
DateTime.ParseExact("'strDateField'", "yyyymmdd", new CultureInfo("en-US"));
(Statement above does not compile which is expected, but only posted as to provide an example of what I'm trying to achieve)