Forum Discussion
How to change YYYYMMDD into date format?
- 9 years ago
No No,
u r trying to create in power Query window. so only it throws error.
i was gave u DAX Query.
U have to create new column in Development environment .
1. Create via Modelling Tab.
2. Right click on Table and choose new colum and apply the formula
Let me know if any help
- 9 years ago
assume: [date] is in the following format: yyyymmdd
create a new column named [dateFormatted] and apply the formula as follows:
- dateFormatted = Date(Left([date],4),Right(left([date],6),2),right([date],2)
select the new column and change its type to date as follows:
[dateFormatted] will now be of type date, formatted as: dd Mmm yyyy
Create new column not measure.
OK, i created a custom column and these new column call DATUM.
Still i get a error of Expression.Error: The name 'DATUM' wasn't recognized...
what did i wrong?
- Baskar9 years ago
Resident Rockstar
No No,
u r trying to create in power Query window. so only it throws error.
i was gave u DAX Query.
U have to create new column in Development environment .
1. Create via Modelling Tab.
2. Right click on Table and choose new colum and apply the formula
Let me know if any help
- parry2k9 years ago
Super User
for using data model, you need to use following expression when you add custom column
=Date.FromText( Text.Range([Input Date as Sting], 0,4) & "-" & Text.Range([Input Date as Sting], 4,2) & "-" & Text.Range([Input Date as Sting], 6,2) )
More information here:
https://msdn.microsoft.com/en-us/library/mt260703.aspx