Forum Discussion
Funky date format from CSV file
- 8 years ago
Hi Anonymous,
Assuming the lengths of you month and year are always 2 and 4 respectively, you may use this formula in PQ: Text.PadStart(Text.Start([Date Text], Text.Length([Date Text])-6), 2, "0") & "-" &
Text.Start(Text.End([Date Text], 6), 2) & "-" & Text.End([Date Text], 4)Just replace [Date Text] with your date column.
Hi Anonymous,
Assuming the lengths of you month and year are always 2 and 4 respectively, you may use this formula in PQ: Text.PadStart(Text.Start([Date Text], Text.Length([Date Text])-6), 2, "0") & "-" &
Text.Start(Text.End([Date Text], 6), 2) & "-" & Text.End([Date Text], 4)
Just replace [Date Text] with your date column.
- Anonymous8 years agoNot applicable
Thanks danextian it works perfectly.
I have checked the file, and it seems like there setup of the date is always as i described, so i think your solution should work all the time.