9 Replies Latest reply: Sep 11, 2013 1:29 PM by Eliot Arnold RSS

    Date(Date#)) function yields many duplicates

      Hi all,

       

      I am importing from an ODBC server orders with their request date.

      I would like to plot this in a chart where the dimension is YYYYMM, whereas the request date in the ODBC field is YYYYMMDD.

       

      Therefore I wrote in the script

      Date(Date#(LRDTE, 'YYYYMMDD'),'YYYYMM') AS RqstDte
      

       

      It turns out fine and dates are imported as YYYYMM.

       

      But, if I look in the list box, all the YYYYMM values are repeated as many times as the number of orders connected to them.

      Further, when I plot the chart, of course it displays all these repeated months in the dimension.

       

      It seems like that the Date(Date#)) function formats correctly the date, but indeed keeps stored the 'DD' information hidden somewhere.

       

      Which formula shall I use to have QV sees the dates univocally?

       

      Thank you for your help!