Forum Discussion
Format Date Column
- 2 years ago
Try this: Table.TransformColumns(Navigation, {{"YYYY-MM-DD", each Date.ToText(_, "yyyy-MM-dd"), type text}}) and see if this solves your problem
Yes it's possible. Please try this:
Table.TransformColumns(Navigation, {[#"Date"], each Date.ToText(_, "yyyy-MM-dd")})
Instead of "Table.AddColumn(Navigation, "Custom", each Date.ToText([#"Date"], "yyyy-MM-dd"))"
Whilst visually, this looks correct, i just tried it and it gives me this error :
Expression.Error: There is an unknown identifier. Did you use the [field] shorthand for a _[field] outside of an 'each' expression?
- _AAndrade2 years ago
Resident Rockstar
I use tha name of my column Date where I want to transform.
Probably the error is on the [#"Date"]. Replace this column name for your column date name.- PPStar2 years ago
Helper V
I did that. My date column is called Y-M-D.
This is the code i am using
#"Custom Column" = Table.TransformColumns(Navigation, {[#"Y-M-D"], each Date.ToText(_, "yyyy-MM-dd")})- _AAndrade2 years ago
Resident Rockstar
Try this: Table.TransformColumns(Navigation, {{"YYYY-MM-DD", each Date.ToText(_, "yyyy-MM-dd"), type text}}) and see if this solves your problem