Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

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. ...
  • parry2k's avatar
    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" )