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: 
jyothish8807
Master II
Master II

Find time difference

Hi,

I have two fields : 1) date and time received : 12/16/2013 07:23 am

                          2) date and time sent :      12/17/2013 05:00 pm

No how can i find the total hours between date and time sent and date and time received.


Thanks & Regards

Jyothish KC

Best Regards,
KC
11 Replies
jyothish8807
Master II
Master II
Author

Sure Jagan,

This a sample of my excel sheet.

NameDate ReceivedTime ReceivedDate sentTime Sent
a17-Dec-133:44 AM18-Dec-132:39 PM
b17-Dec-133:44 AM17-Dec-133:25 PM
c17-Dec-133:44 AM23-Dec-133:25 PM

Now i am trying to find out the time duration between both.

Best Regards,
KC
jagan
Luminary Alumni
Luminary Alumni

Hi,

Try this script

LOAD *,

IntervaL(Timestamp#([Date sent] & ' '& [Time Sent], 'D-MMM-YY HH:mm TT') - Timestamp#([Date Received] & ' '& [Time Received], 'D-MMM-YY HH:mm TT'), 'H') AS Diff

INLINE [

Name,Date Received, Time Received, Date sent, Time Sent

a, 17-Dec-13, 3:44 AM, 18-Dec-13, 2:39 PM

b, 17-Dec-13, 3:44 AM, 17-Dec-13, 3:25 PM

c, 17-Dec-13, 3:44 AM, 23-Dec-13, 3:25 PM];

Regards,

Jagan.