Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
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 (1)
2 Replies
Anil_Babu_Samineni

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)