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

Announcements
Note: You may notice some temporary visual or styling issues in the Community. Our vendor is actively investigating.
cancel
Showing results for 
Search instead for 
Did you mean: 
hkg_qlik
Creator III
Creator III

DATE DIFFERENCE

Hi I have 2 dates :

START DATE

END DATE

START DATE : 11/01/2013 20:00:00

END DATE :  12/01/2013 15:00:00

The difference should display : 30 Days 5 Hrs (Something like this which convert the difference into Days and hours)

Currently using Expression : =Interval( [END DATE] - [START DATE],'D')

2 Replies
hic
Former Employee
Former Employee

If the two dates are interpreted correctly, you will get 30 - 5/24 = 29.79  . The Interval function is not necessary. Hence:

Timestamp#('12/01/2013 15:00:00','MM/DD/YYYY hh:mm:ss') - 

Timestamp#('11/01/2013 20:00:00','MM/DD/YYYY hh:mm:ss') as Interval,

HIC

angelaecheverri
Creator
Creator

Try

ceil( [END DATE], 1) - ceil([START DATE], 1

ceil( 2.4 ) =3

ceil( 2.6 ) = 3

ceil( 3.88 , 0,1 ) = 3,9

ceil( 3.88 , 5 ) = 5

ceil( 1.1 , 1 , 0.5 ) =1,5