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: 
Not applicable

How to substract time and date fields.

Dears..

I am creating a project dashboard and i need to substract two time fields like for example i have the field one call Time1 (12:45) and the second Time2 (13:25) if i substract Time2 - Time1 i hope to obtain the result 00:40.

And also make the same with date feilds and obtain the result in days.

Someone can help me with this?, and how to show the result in a meter grafic?

Thanks

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Use the Interval() function.

Below pasted from the QV Desktop Help :

interval( A-B, 'D hh:mm' ) where A=97-08-06 09:00:00 and B=96-08-06 00:00:00 returns:

   

String

365 09:00

Number

365.375 

View solution in original post

2 Replies
Anonymous
Not applicable
Author

Use the Interval() function.

Below pasted from the QV Desktop Help :

interval( A-B, 'D hh:mm' ) where A=97-08-06 09:00:00 and B=96-08-06 00:00:00 returns:

   

String

365 09:00

Number

365.375 

Not applicable
Author

Thanks works great.