Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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 Number | Machine | Dwell Time | Waiting Time |
---|---|---|---|
1 | 1 | 00:01:02.5270 | 00:00:02.8145 |
1 | 1 | 00:00:56.6354 | 00:00:02.4587 |
1 | 1 | 00:00:42.4584 | 00:00:04.8537 |
1 | 2 | 00:01:02.5574 | 00: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
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
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;