I’m currently reading a csv file which has a title page in the first two rows. I’m using the assign and AsEnumerable function to skip the title page and read in the data. The data contains 57 columns where four of the columns are string dates in (“MM/dd/yyyy hh:mm:ss”) format. I need to change the format on output to (“yyyy-MM-dd hh:mm:ss”). I’ve gone through previous posts and most seem to use a for each row in combination with the Globalization.CultureInfo.InvariantCulture to change the format. This works but is extremely slow. Is there a more efficient way to Convert four data columns. My file is 47,669 records once I’ve removed the title page.
My current test
- Excel Application Scope - Read Range
- Assign - Using the AsEnumerable function and skip drop the title rows (created a table with 57 columns)
- For Each Row - Replace the dates with the correct format.
- Write a Caret delimited file
Thank you in advance.