Change date format in column

New Microsoft Excel Worksheet.xlsx (7.9 KB)

@jntrk - Fixed it…here you go…

dt.AsEnumerable().ToList().ForEach(Sub(row) row(0)=DateTime.ParseExact(row(0).ToString.Trim,“M/d/yyyy HH:mm:ss”,System.Globalization.CultureInfo.InvariantCulture).ToString(“dd.MM.yyyy”))

My Ouput

image

Note: M/d/yyyy HH:mm:ss - This done the trick…

Also, I did not use Preserve format, which may slow down the process.

1 Like

I still get the same error, its in “G” column if you need to know i unchecked format as well
:sob:

can you send me the xaml file?

@jntrk - There might be empty rows…that’s one thing I can guess…

In the sheet which you gave me, Date is on column A so I coded 0…if its G on yours then use 7.

is it possible to send the original sheet just by removing the data on the other columns(keeping the column header as is)…???

1 Like

aaaahhh thank you, yea I changed it to 6 since index starts from 0, it works thank you very much.

1 Like

@jntrk - Yup it is 6. Please mark someone post as solution , that will close this thread.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.