Forum Discussion
How to change YYYYMMDD into date format?
Hi,
I'm little late but might help others...
The fastest and easiest solution is to use the the "Column from example" and your dates should be recognized after you type in a transformation of one of your date.
So the folowing formula will not be needed. In case you don't like code, it is the best way.
If you like to write your own code, there is a M function you can use in customn column:
Date.From(Text.From([#"DATE AUGMENT ATION"])) if you have a numeric column
or
Date.From([#"DATE AUGMENT ATION"])
(you also have the Date.fromText function, check out differences if needed)
Wishing you good transformation
I have a very simple way to do this in Power Query Editor (late, but might help others as AilleryO also stated in his reply).
Three steps:
1. Change the date column type to Text
2. In case you have zero-values in your data (00000000), replace the 00000000 values with blank values, i.e. leave empty (this can be done in Transform tab --> Replace Values)
3. Change the date column type to Date
Note: If you don't need to do number 2., make a new step instead of replacing the previous one, otherwise it will skip the Text conversion and you'll end up of getting an error.