Date changed after I transpose table

After I transpose the table on the left, the date changed. How do i change it back to the format in column A?

Hi @helpplease

When you are using read range workbook activity before transpose data. In the properties of read range workbook activity check the preserve format option it will give the same datatype format in the datatable.

Hope it helps!!

Hi @helpplease ,

Could you let us know what was the Transpose method used ?

^this video

@helpplease

dt.AsEnumerable().ToList().ForEach(Sub(row) row(0)=DateTime.ParseExact(row(0).ToString.Trim,“d/mm/yyyy ”,System.Globalization.CultureInfo.InvariantCulture).ToString(“MMMM yyyy”))

@helpplease ,

In that case, Could you try using PreserveFormat option as True when using Read Range activity.

You can find it in Read Range activity properties.

Let us know if it does not work.

it didn’t work. Only the $ spent values moved from the align right to align left

@helpplease ,

Could you add an Additional string ' when creating the Column names for the Transposed Datatable.

image

Thank you, it worked. Why adding ’ , will help solve the issue?

@helpplease ,

The representation in Excel is different when used Date values, It automatically recognises it as a Date value, and the default date representation (MM/dd/yyyy) is shown in the Excel.

ok, thank you for the explanation.

1 Like

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