8 Replies Latest reply: Jan 13, 2017 10:44 AM by Sunny Talwar RSS

    Comparing two dates in Set Analysis challenge

    buck master

      What is wrong with this set analysis statement?

           sum({<Scenario = {'Actual'}, Date(FLOOR(TimeStamp#(PR_BUSINESS_DAY))) = {'=$(vCurrentDate}' >} AMOUNT)

       

      In the load script I have:

      LET vCurrentDate = Today();

      Which generates:

      1/11/2017

       

      Testing the timestamp removal works as expected:

           Date(FLOOR(TimeStamp#(PR_BUSINESS_DAY)))

      changes datetime of --> 5/4/2016 12:00:00 AM  --> to 5/4/2016 as expected

       

      In a table object I have this that is not working:

      sum({<Scenario = {'Actual'}, Date(FLOOR(TimeStamp#(PR_BUSINESS_DAY))) = {'=$(vCurrentDate}' >} AMOUNT)

       

      It returns all of the rows when I should only return the one THAT MATCHES THE DATE!

       

      Can anyone see the issue?

       

      Thanks in advance....