After writing the M code I clicked the "Close & Load" and the "DateTime" column (in the Excel view now column G) changed to a decimal format.
I see that column G is formatted as "General" while columns H and I (column I now blank) are formatted as "Custom" [Date/Time].
Why would column G (and column I) keep the previous format and not update?
Hi Douglas,
Did you set the data type for the DateTime column in Power Query to DateTime?
Keep in mind that the date types in Power Query are not formats. The formats applied to cells in the Excel grid override most data types.
Mynda
I did not set the data type for the Date/Time column, it was already setup with the custom date/time format.
It is just disappointing the Power Query data types do not pass back to Excel when you 'Close and Load'. I guess I am trying to think of a reason why we would not want that to happen.
I'm a bit confused. To clarify, did the Date/Time column in Power Query had the Date/Time data type set? If so, it should feed through to Excel as a date/time format unless the column in Excel has been overridden with a different number format.