Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have two timestamp fields. For example, Datetime_Start and Datetime_End.
First, I want to calculate the difference in minutes between these fields. I am able to achieve using below expression,
Interval((Datetime_End - Datetime_Start ),'mm').
Now, i want to convert that difference into hours with two decimal value. For example, If we have difference is 881in minutes, then i should get 14.68 (881/60). But it shows other value like, 0.01020755.
Why it is happening like this? Is it because the value already in minutes? In this case, how do we change into number before convert into hour with decimals.
I am using QlikView 10 SR3 version. Please let me know. Thanks in advance.
Regards,
Durai.
The current values are fractions of one day -- which is how times are stored. To convert to hours with two decimals, the conversion would be:
round( (Datetime_End - Datetime_Start ) / (1/24), .01)
-Rob
The current values are fractions of one day -- which is how times are stored. To convert to hours with two decimals, the conversion would be:
round( (Datetime_End - Datetime_Start ) / (1/24), .01)
-Rob
Thanks Rob. It works!!!