5 Replies Latest reply: Oct 5, 2012 5:09 PM by Rob Wunderlich RSS

    Date in the Where Clause

    Shilpan Patel

      Hello,

       

      I'm new to Qlikview. I've been trying to add date range in the where clause, and it is not working. Please advise.

       

       

      CUSTOM CONNECT TO "Provider=SalesForceDLL.dll;T21;XUserId=BESWWZBNJDbAXQZNOZacCYFMULZYGANOVTbIHZVOTDdcSRdNNTLGGYJOOBcEXSBOSbbIGRD;XPassword=TQaULZFMNLYIWQFGQZMKTZET;";

       

      Let vToday = Date(Today(), 'YYYY-MM-DD');
      Let vMonthStart = Date(MonthStart(Today(), 'YYYY-MM-DD'));
      Let vMStart = '2012-09-01';
      //LOAD *
      //FROM Case
      //Where ClosedDate > '$(vMonthStart)' AND ClosedDate <= '$(vToday)';

      LOAD *;
      SQL SELECT *
      FROM Case
      Where ClosedDate > '$(vMStart)' AND ClosedDate <= '$(vToday)';

       

      This is the runtime error message I get: 

      Value for the filter criterion for the field 'ClsoedDate' must be of type Datetime and should not be enclosed in the quotes.

      I tried without quotes, and it is not working either.

      Thanks,
      Shilpan