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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
nuwanhwb87
Contributor III
Contributor III

How to Calculate Duration from Two Times

03.PNG

Hi,

I have Above table with IN Time and Out Time.

Need to calculate total Duration

Out Time - In Time

Specially How to Extract the time from Above Date Format

Labels (2)
2 Replies
Anil_Babu_Samineni
MVP
MVP

Perhaps this

Date(Date#(IN_TIME, 'DD/MM/YYYY HH:MM:SS TT')-Date#(OUT_TIME, 'DD/MM/YYYY HH:MM:SS TT'), 'HH:MM:SS')

Or

Interval(Date#(IN_TIME, 'DD/MM/YYYY HH:MM:SS TT')-Date#(OUT_TIME, 'DD/MM/YYYY HH:MM:SS TT'), 'HH')

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
nuwanhwb87
Contributor III
Contributor III
Author

Hi,

thanks for quick reply,

Unabel to run first code in PL/SQL Developer Error Message Emerge (ORA-00936 Missing Expression)