Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Calculate difference between two dates?

HI all,

I have two date fields, I have to calculate the difference in hours. viz., open date and close date.

Open_Date                  Close_Date

10/01/2016 08:20:00     12/01/2016 9:50:00

I used timestamp for both the columns and on the result also.

Eg: timestamp(Close_Date) - timestamp(Open_Date )  as Cycletime

Now i am getting the time in hours and minutes as below.

Eg: difference between abve dates is 49:30:00.

What I am expecting is like 49.50 hours(I have to calculate that 30 minutes into hours then add that to the 49 hours)

Thanks for any ideas.

regards

Prashanth

11 Replies
Not applicable
Author

I have used timestamp on two date columns and then subtracted, on result field again applied timstamp,

Its working.

Not applicable
Author

working when i appiled the timestamp separately on the date columns.