johnny51981
Active Member
- Joined
- Jun 8, 2015
- Messages
- 406
Hi All:
I have a number of CSV source files, most of which have numerous columns that are populated with DateTime from the source they are exported from. When I do my load and transform, each of those CSV Date columns are automatically detected as "type datetime", but when I change it to just "type date" the data population results as an Error. All of this is really working my nerve and OCD, not to mention I really want to keep as few steps as possible without degrading the final result.
Is there a way to get to "type date"? Here is the run down of the steps in one of my queries:
TIA
I have a number of CSV source files, most of which have numerous columns that are populated with DateTime from the source they are exported from. When I do my load and transform, each of those CSV Date columns are automatically detected as "type datetime", but when I change it to just "type date" the data population results as an Error. All of this is really working my nerve and OCD, not to mention I really want to keep as few steps as possible without degrading the final result.
Is there a way to get to "type date"? Here is the run down of the steps in one of my queries:
Power Query:
let
FilePath = Excel.CurrentWorkbook(){[Name="FolderPath"]}[Content]{0}[Column1],
Source = Csv.Document(File.Contents(FilePath & "03. Jobs and Milestones.csv"),[Columns=33]),
#"Promoted Headers" = Table.PromoteHeaders(Source, [PromoteAllScalars=true]),
#"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"Survey Start Date", type datetime}, {"Expected Survey Completion Date", type datetime}, {"Survey Completion Date", type datetime}, {"Expected Permit Complete Date", type datetime}, {"Permit Start Date", type datetime}, {"Permit Milestone Complete Date", type datetime}, {"Design Start Date", type datetime}, {"Expected Design Completion Date", type datetime}, {"Design Completion Date", type datetime}, {"Construction Start Date", type datetime}, {"Expected Construction Completion Date", type datetime}, {"Construction Milestone Complete Date", type datetime}}),
#"Changed Type1" = Table.TransformColumnTypes(#"Changed Type",{{"Survey Start Date", type date}, {"Expected Survey Completion Date", type date}, {"Survey Completion Date", type date}, {"Expected Permit Complete Date", type date}, {"Permit Start Date", type date}, {"Permit Milestone Complete Date", type date}, {"Design Start Date", type date}, {"Expected Design Completion Date", type date}, {"Design Completion Date", type date}, {"Construction Start Date", type date}, {"Expected Construction Completion Date", type date}, {"Construction Milestone Complete Date", type date}}),
TIA