2 Replies Latest reply: Aug 7, 2012 3:05 PM by Rebecca Molstad RSS

    Year is pulling individual day

    Rebecca Molstad

      Hi All,

       

      I am using the following script to load a timestamp as its correct year and date:

       

      Left Join

      LOAD DATE ([ContractStartDate],'MM/DD/YYYY') AS ContractStartDate

                ,DATE([ContractStartDate],'YYYY') AS ContractStartYear

                ,DATE([ContractStartDate],'MM') AS ContractStartMonth

       

      However, when I show the ContractStartYear as a list, it returns the same year multiple times, and even though each one looks the same, they actually pull a single day's worth of data, not the whole year.

       

      Example:

       

      ContractStartYear

      2001  <--only refers to 01/05/2001

      2001  <--only refers to 05/04/2001

      2001  <--only refers to 07/12/2001    etc...

      2001

      2002

      2002

       

      Is there something I need to specify in the script so that it will instead yield the following:

       

      ContractStartYear

      2001  <--refers to entire year of 2001

      2002  <--refers to entire year of 2002  etc...

       

      Thanks!