
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Calculating time difference between date and time stamps
Hi,
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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:
Main:
load
*,
interval(Timestamp#([End Date],'DD/MM/YYYY hh:mm') - Timestamp#([Start Date],'DD/MM/YYYY hh:mm'),'hh:mm') as [Time difference]
Resident
Staging;
.png)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Regards,
Brett
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.
