Modify date in Excel

I would like to change the date format in the whole column from yyyy-mm-dd to dd.mm.yyyy. How can I do this?

Hi @sullivanne

Check out this thread

Regards
Gokul

Hi @sullivanne

=> Use Read Range workbook activity to read the excel and store in a datatable.
- Output:dtInputData (your DataTable variable)

- Assign => dtOutputData = (From row In dtInputData.AsEnumerable() Let oldDate = DateTime.ParseExact(row("YourColumnName").ToString(), "yyyy-MM-dd", CultureInfo.InvariantCulture)  
Let newDate = oldDate.ToString("dd.MM.yyyy")
Select dtOutputData.Rows.Add(row.ItemArray.Take(row.ItemArray.Length -1).Concat({newDate}).ToArray())).CopyToDataTable

=> Use Write Range workbook activity to write the updated DataTable back to Excel.

Hope it helps!!

1 Like

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