2 Replies Latest reply on Oct 29, 2013 9:53 AM by Joao Correia

    Custom date formats not working

    Joao Correia

      Hi,

       

      I have the following table:

       

      DateProduct Revenue
      20131027$111,350.19
      20131006$96,732.70

       

      When importing it in Tableau I should be able to assign Date a custom format of yyyymmdd but it doesn't seam to work.

      My cells are formatted as text and I customize them in Tableau.

       

      Any ideas?

       

      Thanks

      Joao

        • 1. Re: Custom date formats not working
          kettan

          I think it is because the date is seen as a number or text by Tableau.

           

          1) You can use a calculated formula such as

          DATE(LEFT(STR([Date]), 4) + "-" + MID(STR([Date]), 5, 2) + "-" + RIGHT(STR([Date]), 2))

           

          If [Date] is a string, you will not need the STR function:

          DATE(LEFT([Date], 4) + "-" + MID([Date], 5, 2) + "-" + RIGHT([Date], 2))

           

          2) or change the field to a date format Tableau recognizes before you import the data.

           

          3) If your source is a text file, you can probably define the date format in a schema.ini file you store in the same folder.

           

          4) I think Tableau will be able to this on the fly in soon to be released Tableau 8.1 (or maybe it is 8.2).

           

          Ps. Print screen of my workbook with your data:

          Custom date formats not working.png

          • 2. Re: Custom date formats not working
            Joao Correia

            Thank you Kettan!