Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Now Live: Qlik Sense SaaS Simplified Authoring – Analytics Creation for Everyone: READ DETAILS
Showing results for 
Search instead for 
Did you mean: 

Calculating time difference between date and time stamps


I am having an issue with a combined  date and time stamp.

Basically all I want to do is calculate (In hours) the time difference between a start day&time stamp and the end of the day&time stamp. 

All start and end times are differentiated by a reference number. 

I researched in the Qlik community and tried different solutions however, even when QlikView returns a result it will still return a number which is not the correct amount of hours between a start and an end time. 


I attached an example of what I am trying to achieve 

Labels (3)
2 Replies

Hi, Timestamp#() is used to tell the format of the timestamp that is being readed, so in this case it should be 'DD/MM/YYYY hh:mm' (note that time letters are lowercase: MM for months, mm for minutes), so the final table shoud be:

  interval(Timestamp#([End Date],'DD/MM/YYYY hh:mm') - Timestamp#([Start Date],'DD/MM/YYYY hh:mm'),'hh:mm') as [Time difference]



Did Ruben's post get you what you needed?  If so, do not forget to return to your thread and on his post, use the Accept as Solution button to mark his post as the solution and given him credit for the help as well as let other Members know it worked.  If you are still working on things, leave us an update on what you still need.


To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.