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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
wade12
Partner - Creator II
Partner - Creator II

qlikview date/time

quick question please, any/all advices appreciated, thank you in advance.

formula to calculate correct duration please (as per screenshot):

note, the figures for duration in the screenshot are incorrect because they fai to take into account the rolling over into another day.

Labels (1)
1 Solution

Accepted Solutions
marcus_sommer
MVP
MVP

If you export this table to excel you will see that the calculation will be right but Qlik displayed only the time-part. To display also the days you could use: interval(End - Start, 'D hh:mm:ss'). And you need to enable expression-standard within the tab numbers.

- Marcus

View solution in original post

7 Replies
sunny_talwar
MVP
MVP

I think you need to use TimeStamp fields which have dates in them to find the difference and then use Interval function to get the duration

Interval([Seq No. End Date] - [Seq No. Start Date], 'hh:mm:ss')

tresB
Champion III
Champion III

May be like this?

Interval( Date1-Date2, 'hh:mm:ss')

Anil_Babu_Samineni
MVP
MVP

Perhaps this?

Interval(TimeStamp#([Seq No. End Date]) - TimeStamp#([Seq No. Start Date]), 'hh:mm:ss')


Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
marcus_sommer
MVP
MVP

If you export this table to excel you will see that the calculation will be right but Qlik displayed only the time-part. To display also the days you could use: interval(End - Start, 'D hh:mm:ss'). And you need to enable expression-standard within the tab numbers.

- Marcus

wade12
Partner - Creator II
Partner - Creator II
Author

Thanks Marcus.

... but how can I format 1 04:30:00 to be 28:30:00 ?

sunny_talwar
MVP
MVP

Instead of using the format 'D hh:mm:ss', use 'hh:mm:ss'

wade12
Partner - Creator II
Partner - Creator II
Author

Thanks Sunny.