Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Arvind_Singh
Contributor II
Contributor II

Display Value of date field which are older than 48 hours

Hi,

I have a table as shown below -

Last_update_timeTicket Number
2020-06-17 19:01:025685412
2020-06-16 00:12:272541785
2020-06-15 23:31:515214587
2020-06-15 10:02:103265974
2020-06-12 10:15:422541957
2020-06-05 00:24:203524178

 

I am looking for an expression to display only those Tickets for which the Last_update_time is 48 hours older than the current time.

So the expression should return below output -

Ticket Number
3265974
2541957
3524178

 

Thanks in advance for help 🙂.

Labels (1)
2 Solutions

Accepted Solutions
tresesco
MVP
MVP

Try like:

if(Last_update_time<now()-2, [Ticket Number])

View solution in original post

tresesco
MVP
MVP

In qlik,

1 is equivalent to 1 day. Therefore, rest of the calculations are very straight forward.

1/24 =~ 1 hour

1/24/60 =~ 1 minute

1/24/60/60 =~ 1 second

Now you can calculate for 15 hours - it's  1/24*15

 

View solution in original post

3 Replies
tresesco
MVP
MVP

Try like:

if(Last_update_time<now()-2, [Ticket Number])

Arvind_Singh
Contributor II
Contributor II
Author

Thanks for helping with the Expression.
Could you please let me know how can the same expression be written if I have to display the fields which are older than 15 hours. 

tresesco
MVP
MVP

In qlik,

1 is equivalent to 1 day. Therefore, rest of the calculations are very straight forward.

1/24 =~ 1 hour

1/24/60 =~ 1 minute

1/24/60/60 =~ 1 second

Now you can calculate for 15 hours - it's  1/24*15