1 Reply Latest reply on Jun 4, 2013 12:02 PM by Andy Piper

    Formatting Field as Year

    Catherine Middlebrooks

      Hello. I'm trying to upload an excel file that has a date field in the yyyy format (no day, no month). The years are 2005, 2006,2007,2008,2009,2010.Tableau uploads it as a number field. When I convert it to a date the dates change to








      I can't figure out how to get it to keep the yyyy format. Any help would be greatly appreciated!

        • 1. Re: Formatting Field as Year
          Andy Piper

          Hi Catherine,


          Welcome to the forums.


          Try the following formula in a calculated field to convert your Excel year into a date format that Tableau will recognize.


          Date ("1/1/" + str([<your current year field>]))


          This will give each year a month and day of January 1. If you want a different month/day combination represented (perhaps 12/31), just swap out "1/1/" with what you'd like to see.


          Hope this helps,