Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
CUSTOMERS ONLY: Now accepting customer applications for the 2023 Luminary Program: SUBMIT NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
ipauldur
Creator
Creator

Convert minutes into hour with decimal

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.

1 Solution

Accepted Solutions
rwunderlich

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

View solution in original post

3 Replies
rwunderlich

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

ipauldur
Creator
Creator
Author

Thanks Rob. It works!!!

medina1024
Contributor
Contributor

Thanks, I was searching this solution by several hours