3 Replies Latest reply on Sep 8, 2017 10:04 PM by Zhouyi Zhang

    Covert year that is stored as number to date

    Ashley Brown

      What is the best way to convert 2011 that is stored as a number to 01/01/2011 stored as a date?

       

      This is what I have done- I have a field called Full Year, the data in the field is the year and is displayed like this: 2011. It is coming into Tableau as a number. I have created a new calculated field called Full Year (copy) that has this calculation: STR([Full Year]) in order to convert the number to string. I think have created another calculated field called Year_Date that has this calculation: DATE("01/01/" + ([Full Year (copy)]))

      It works but when I close and reopen the workbook, I get a date parse error.