Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
manojkulkarni
Partner - Specialist II
Partner - Specialist II

Interval value into number

Hi Friends,

I am using interval function to calculate difference of 2 dates & getting difference values in minutes. I need to use this value to calculate % of total minutes in month. eg: my derived values in 768 minutes and total minutes available is 41760. % is 1.8%. but i am getting a different value all together which is .0013%.

When I convert the above value 768 to number using num() function, it returns me .0056.. something.

Why can't we use 768 value directly ?

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

The unit of times and dates is days. The interval function still returns a value with a unit of days. If you format the result of the difference between two dates in minutes you only change the display format. The real value is still in days. There are 1440 minutes in a day so if you want to use 768 directly then you have to multiply it by 1440.


talk is cheap, supply exceeds demand

View solution in original post

3 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

The unit of times and dates is days. The interval function still returns a value with a unit of days. If you format the result of the difference between two dates in minutes you only change the display format. The real value is still in days. There are 1440 minutes in a day so if you want to use 768 directly then you have to multiply it by 1440.


talk is cheap, supply exceeds demand
Kushal_Chawda

Try this

time(frac(round(Date1,(1/24*60))) - frac(round(Date2,(1/24*60))),'mm')

manojkulkarni
Partner - Specialist II
Partner - Specialist II
Author

thanks Gysbert Wassenaar,

it worked.