Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Compare timestamps

Hi all,

I would like to create a report with all orders which are created after a specific date and time.

All orders have a created timestamp. I would like to see all orders which are created since 15:00 o'clock the day before today.

I tried different formats, but I can't get it done. Could someone please explain which format I need to use for the following fields to compare them?

  • Oracle database field: createdate
  • Variable in QlikView: date of today minus 1 (to show yesterday) + 15.00 o'clock

Many thanks!

Kind regards,

Henco

5 Replies
simospa
Partner - Specialist
Partner - Specialist

Hi,

did you try to create in load script a field structured as YYYYMMDDHHMMSS? So it will be easy to comparate two integers...

S.

Anonymous
Not applicable
Author

Hi Simone,


Thanks for your reply.

I tried to load the createdate from the oracle database like this: to_char(aoadorder.createdate,'DD-MM-YYYY HH24:MI')

In QV I created a variable like this: timestamp#(today()&' 15:00')

But when I compare these two, it has no effect. So I assume I do something wrong with the formats.

Kind regards,

Henco

Not applicable
Author

Hi Henco,

I think you can use Timestamp#() function.After this it is just as simple as integer comparison.

Regards.

Anonymous
Not applicable
Author

Hi,

In script create variable:

Let vTime = Time(Frac(Today()-1),'03:00');

In UI:

=sum({$<Date={'>=$(=today()-1)'}, Time = {'>=$(=vTime)'}>} Amount)

Regards

Neetha

Anonymous
Not applicable
Author

Thanks, you pointed me in the right direction. Solved the problem by first checking the date and after that checking the time.

Regards,

Henco