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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Need to find Age between Now() and Other date field in Minutes and Hours

Hi Friends,

Need help to get Difference between now() and another date field to create ageing in minutes and hours.

In below example am getting ageing in Days. in same way need to get ageing in minutes and Hours

IF(Num((Date(today(),'DD/MM/YYYY h:mm:ss TT') - Date(Open_DateTime,'DD/MM/YYYY h:mm:ss TT'))) <=1,'>1 Day',
IF(Num((Date(today(),'DD/MM/YYYY h:mm:ss TT') - Date(Open_DateTime,'DD/MM/YYYY h:mm:ss TT')))>1 AND
Num((Date(today(),'DD/MM/YYYY h:mm:ss TT') - Date(Open_DateTime,'DD/MM/YYYY h:mm:ss TT'))<=3),'<3 Days',

Instead of today() am using Now().

Please help me regarding this.

Thanks in Advance...

Vinay N

4 Replies
tresesco
MVP
MVP

Try a simpler one, like:

Class( today()-Open_DateTime, 1, 'day')

Not applicable
Author

Hi Tresesco,

Thanks for the Reply. Exactly my requirement is...I want to find out the total number of tickets violating in next 30 mins, 1 hour, 2 hour and 4 Hour. So I need to consider Now() function. So I need to get Minutes and Hours also with Days. so please suggest

tresesco
MVP
MVP

Try like:

floor(now()-Open_DateTime) - No of days

hour(now()-Open_DateTime) - hours

minute(now()-Open_DateTime) - minutes

second(now()-Open_DateTime) - seconds

Colin-Albert
Partner - Champion
Partner - Champion

The interval() function will return the difference between two datetime values.