13 Replies Latest reply on May 30, 2013 12:20 PM by Ryan Polk

    Converting Integer to Date

    Ryan Polk

      I need to convert an 8 digit integer date field named SDYMD (YYYYMMDD) into a Date field. I have attempted to use this calculation:

       

      Date(char(34)+mid(str([SDYMD]),5,2)+"/"+right(str([SDYMD]),2)+"/"+left(str([SDYMD]),4)+char(34))

       

      SDYMD is the integer field in my data table.

       

      I am receiving this error message from Tableau:

       

      "All fields must be aggregate or constant when using table calculation functions or fields from multiple data sources."

       

      How should I make this conversion?