I have the following code that is not keeping the same date format as the input. The input dates are in a date column and have mm/dd/yyyy formatting in the cell (e. g. 5/7/2019). The result after running the following m-code is 07/05/2019 in a general format. How can I get the output dates to be the same as the input dates using the following code?
let
Source = Excel.Workbook(File.Contents("C:\Users\Sadie\MyDocuments\Excel\ExcelPowerBuilder\pb-v3-test.xlsm"), null, true),
Schedule_Sheet = Source{[Item="Schedule",Kind="Sheet"]}[Data],
#"Promoted Headers" = Table.PromoteHeaders(Schedule_Sheet, [PromoteAllScalars=true]),
#"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"Date", type date}, {"Time", type datetime}, {"Courts", Int64.Type}, {"Teams", type text}})
in
#"Changed Type"
let
Source = Excel.Workbook(File.Contents("C:\Users\Sadie\MyDocuments\Excel\ExcelPowerBuilder\pb-v3-test.xlsm"), null, true),
Schedule_Sheet = Source{[Item="Schedule",Kind="Sheet"]}[Data],
#"Promoted Headers" = Table.PromoteHeaders(Schedule_Sheet, [PromoteAllScalars=true]),
#"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"Date", type date}, {"Time", type datetime}, {"Courts", Int64.Type}, {"Teams", type text}})
in
#"Changed Type"