Forum Discussion

Syndicate_Admin's avatar
Syndicate_Admin
Administrator
4 years ago

Changing text formatting to date

Good afternoon, I have a problem transforming a column that is in text format to date throws me error, what I do is replace the word Annual with empty and try to take 2018 as a date, from now on thank you very much

6 Replies

  • Hello Syndicate_Admin ,

    You would need to remove the text to convert this column to a Date data type, you can do this by removing 'Anual' from the column or if you want to keep the text you could split the column by Deliminator "space" to have one column with the text and one column with the year value.

     

    When converting the column to Date you will get the format '01/01/2018' you can then change the format to 'YYYY' if you wish.

    • Syndicate_Admin's avatar
      Syndicate_Admin
      Administrator

      The problem is that when I remove the Annual and pass it to type of Data: Date throws me error in all

    • Syndicate_Admin's avatar
      Syndicate_Admin
      Administrator

      From the power Query I will replace values and Cancel it I change for nothing

  • Syndicate_Admin I would recommend splitting the column 

    Then delete the column with the text if you do not want to keep and change the year value column to date