2 Replies Latest reply: Sep 4, 2018 7:44 AM by Giovanne Bergstein RSS

    Last 24 hours

    Raman Singh

      Hi All,

       

      I am trying to only include results where the date is equal to or greater than today and minus last 24 hours. The clause I have added does not seem to be working, can someone please help?

       

      The format of 'Date' is: DD/MM/YYYY hh:mm:ss

       

      LOAD

          OrderID as OID1,

          Date

      FROM [lib://OnTrack QVD's (corpbh_qlikadmin)/OrderLegsPlus.qvd]

      (qvd)

      where DATE(Timestamp(PODDate)) >= Today() - 1;


      Thank you in advance.

        • Re: Last 24 hours
          Gabor Tarnoczai

          Hi Raman,

           

          the script seems fine. Do you get any error message or just get empty dataset?

           

          Is there column with name PODDate? - when you get error.

           

          Are you sure this method suits you requirements? I mean the day substraction is not equal to 24hour minus,

          if the minus 24 hours is important then try compare twotimestamps:

          Where Timestamp(PODDate) >= timestamp(now()-1);


          G.


           

          • Re: Last 24 hours
            Giovanne Bergstein

            Hi, try this,

             

            LOAD

                OrderID as OID1,

                Date

            FROM [lib://OnTrack QVD's (corpbh_qlikadmin)/OrderLegsPlus.qvd]

            (qvd)

            Where Timestamp(PODDate) >= Timestamp(ReloadTime() -1);

             

            Reguards