Forum Discussion
Extract year from date data
- 4 years ago
the first parameter of this function should be text, not a date value.
if [order date] is date type,try Text.AfterDelimiter(Text.From([ORDER DATE]),"/",{0,1})
- Anonymous4 years ago
Hi Anonymous ,
If the column type is Date, please directly go to Add Column tab--> Date-->Year to extract :
If the column type is Text, then go to Add Column tab--> Extract --> Last characters:
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. - Anonymous4 years ago
It knows how to parse dates using the rules of the system's culture.
= Table.TransformColumnTypes(Source,{{"Text", type date}}, "en-US") // verses = Table.TransformColumnTypes(Source,{{"Text", type date}}, "en-GB") // or = Table.TransformColumnTypes(Source,{{"Text", type date}}, "fr") // your default is = Culture.Current
Oh, WOW! I've been making it way too hard all this time.
1) select data column
2) Date icon, select year, select year. DONE!
I see now there are many ways to get the result we're seeking, but thanfully this was a "built-in" option.
Thanks to your both. I love this group and shall return.
- Anonymous4 years agoNot applicable
It knows how to parse dates using the rules of the system's culture.
= Table.TransformColumnTypes(Source,{{"Text", type date}}, "en-US") // verses = Table.TransformColumnTypes(Source,{{"Text", type date}}, "en-GB") // or = Table.TransformColumnTypes(Source,{{"Text", type date}}, "fr") // your default is = Culture.Current