Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
narender123
Specialist
Specialist

Calculate time difference

Hi all ,

I have to calculate the time differnce between two dates . Likes:

Column1                                   Column2

09-09-2014 13:28:46                   41891.576825799

Calculate time formate like hh:mm:ss

Both columns are date column .Column2 is in Num format of date.

Please suggest.

Thanks,

Narender

20 Replies
narender123
Specialist
Specialist
Author

Thank you.

Please see my reply to Jagan Mohan ,i have one more question.

Narender

narender123
Specialist
Specialist
Author

Thank you.

Please see my reply to Jagan Mohan ,i have one more question.

Narender

settu_periasamy
Master III
Master III

Hi,

Did you try the Average instead of Sum in the Expression Tab?

Capture.JPG

Digvijay_Singh

Try selecting Avg of rows in Expressions/Total Mode option.

narender123
Specialist
Specialist
Author

Hi Settu,

I have tried but it is showing same result as total

narender123
Specialist
Specialist
Author

Hi Digvijay,

I have tried but it is showing same result as total.

Anonymous
Not applicable

By using the interval function it is working

settu_periasamy
Master III
Master III

Can you post the sample data? or screen shot?

jagan
Luminary Alumni
Luminary Alumni

Hi,

The date difference is in different format when compare to numbers.  How you want the sum to display in terms of Hours or Days?

For Days:

Ceil(Num(Time2 - Time1) )

For Hours:

Ceil(Num(Time2 - Time1) * 24 )

Hope this helps you.

Regards,

jagan.

PrashantSangle

Hi,

As other people suggested Expression Tab -> Total Mode -> Average of rows must work.

Can you give provide screen shot of your chart after applying above said suggestion.

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂