7 Replies Latest reply: Jul 22, 2013 5:29 AM by genieworks RSS

    Convert string to date for comparison in set analysis

      Hi,

       

      I have the following data:

       

      Month          Amount

      01/01/13          200

      01/02/13          100

      01/03/13          300

      01/04/13          300

      01/05/13          200

      01/06/13          100

      01/07/13          500

      01/08/13          100

      01/09/13          200

      01/10/13          100

      01/11/13          200

      01/12/13          400

       

      The "Month" is a string value. Also I have created a variable, 'vChoosenDate' as '01/04/13' (String too).

      I have to display a text object which display the spend to date values.

       

      Example total amount will be 600 if user choosen '01/04/13' (which is April month).

      How do I create the analysis code?

       

      I have tried the following but it does not work.

       

      1. Created a temp variable, vTempMonth, as Date#(Month,'DD/MM/YY')

      2. Created another temp variable, vTempChoosenDate as Date#(vChoosenDate, 'DD/MM/YY')

      3. In my text object, display as =Sum({<vTempMonth={vTempChoosenDate}>}Amount)