Qlik Community

Ask a Question

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
QlikWorld Online 2021, May 10-12: Our Free, Virtual, Global Event REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
rsingh43
Creator
Creator

Last 24 hours

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.

2 Replies
undergrinder
Specialist II
Specialist II

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.


giovanneb
Creator II
Creator II

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