Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

cancel
Showing results for 
Search instead for 
Did you mean: 
igdrazil
Creator III
Creator III

Qlik Sense omitting Milliseconds

Hi Community,

I have a requirement for my current app to load the milliseconds of a time field, but for some reason qlik is omitting the milliseconds value. I've tried editing the variables in the Main tab in the loading script and also tried some shenanigans with the num#/timestamp# and time-functions.

Here's also an example of the database

Experiment NumberMachineDwell TimeWaiting Time
1100:01:02.527000:00:02.8145
1100:00:56.635400:00:02.4587
1100:00:42.458400:00:04.8537
1200:01:02.557400:00:03.6584

Usually i would ignore the milliseconds, but i have around 50 rows per machine, each nearly 1 second in milliseconds, which means i got a total difference of around 40 to 50 seconds.

Thanks in advance

Chris

11 Replies
igdrazil
Creator III
Creator III
Author

Yes you're right, they are actually Microseconds, but that doesn't change my problem.

Here another example:

Database value = Input: 00:00:02.8145

After being loaded in Qlik: 00:00:02.000

So the base of the Problem i have is, that it does not matter how many numbers are shown after the decimal place, because they are all omitted.

Regards

Chris

Lemac
Contributor III
Contributor III

What I did to counter this problem was a different approach. I accepted that Qlik doesn't provide milliseconds, so I decided to get them from somewhere else. In this case a MSSQL database.

 


LIB CONNECT TO [Customers_Data];

[Performance]: //Start time
Load
Start;
SQL SELECT CURRENT_TIMESTAMP as Start;


//==========================
//Do some stuff
//==========================

 

[Performance2]: //End Time
Load
End;
SQL SELECT CURRENT_TIMESTAMP as End;

 

Performance3: //Calculate WaitingTime
NoConcatenate Load
Start,
peek('End', '-1', 'Performance2') as End,
interval(peek('End', '-1', 'Performance2')-Start, 'hh:mm:ss:fff') as WaitingTime
Resident Performance;