Forum Discussion
Anonymous
7 years agoNot applicable
Change Text field to Date format
Hi All, I have a column 'Period Key' which is used to join fact table and dim_date. This column has data of type string as 20170928. I am trying to to change this to date for below calculation. ...
- 7 years ago
Anonymous try this , add as new column
Date = FORMAT( DATE( LEFT( Table1[PeriodKey], 4 ), MID( Table1[PeriodKey], 5, 2), RIGHT( Table1[PeriodKey], 2 )) , "YYYY/MM/DD" )
parry2k
Super User
7 years agoAnonymous try this , add as new column
Date = FORMAT( DATE( LEFT( Table1[PeriodKey], 4 ), MID( Table1[PeriodKey], 5, 2), RIGHT( Table1[PeriodKey], 2 )) , "YYYY/MM/DD" )