Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

time difference between excel and qlikview

Hello All,

When I convert 00:03:16 in excel I get the answer 0,00252099135574689 but when I convert the same 00:03:16 in qlikview I get 0,0017707329195295

I need the figure to be 0,00252099135574689 (like in the excel).

Any idea please?

Kind Regards

Hasvine

1 Solution

Accepted Solutions
Peter_Cammaert
Partner - Champion III
Partner - Champion III

Both are incorrect.

00:03:16 is equal to 3 * 60 + 16 = 196 seconds. To get the numerical time value, you calculate the part of the day by dividing 196 / 86400 = 0,0022685185185185.

Both QlikView and Excel use the same internal representation for datetime values. I did use neither one. Just Windows calculator.

BTW when entering expression =time(0.0022685185185185) in a QlikView text box, it returns 00:03:16.

When entering 0,0022685185185185 in an Excel cell and changing the cell format to Time, it returns ... 00:03:16.

Best,

Peter

View solution in original post

6 Replies
ahaahaaha
Partner - Master
Partner - Master

Hello, Hasvine.

In the attached files, your data is modeled in the Excel and QlikView. As can be seen, the conversion results are the same in both cases.

Given that the time change in seconds, the iteration step is 1/86400 = 0.000011574 (60 seconds * 60 hours * 24 minutes = 86,400 seconds in a day). Consequently, distortion may occur if the required number is displayed in the time format .00252099135574689.

Alternatively, it is possible to use in the calculation of time in numeric format, adding a fraction of a second later when the conversion results in the time format.

Kind Regards

Andrey

Not applicable
Author

Hi Hasvine ,

Have a nice day.

What is the conversion function your are using.

Anonymous
Not applicable
Author

Which Excel function gives you the output?

PrashantSangle

Hi,

use frac()

try below

=frac(time#('00:03:16','hh:mm:ss'))

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 🙂
Peter_Cammaert
Partner - Champion III
Partner - Champion III

Both are incorrect.

00:03:16 is equal to 3 * 60 + 16 = 196 seconds. To get the numerical time value, you calculate the part of the day by dividing 196 / 86400 = 0,0022685185185185.

Both QlikView and Excel use the same internal representation for datetime values. I did use neither one. Just Windows calculator.

BTW when entering expression =time(0.0022685185185185) in a QlikView text box, it returns 00:03:16.

When entering 0,0022685185185185 in an Excel cell and changing the cell format to Time, it returns ... 00:03:16.

Best,

Peter

Not applicable
Author

thank you Peter for your explanation.

Kind Regards,

Hasvine