Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Moving to a 1s window to a ms window

I have the following code that enables a timestamp filter to show the values at a 1s time window (I have data well into 20hz):

    //ESTABLISH A FILTER THAT ALLOWS FOR DATA AGGREGATION AT AN 1S BASIS

  TIMESTAMP(FLOOR([ts],1/(24*60*60))) as [RESULT TIMESTAMP 1SEC],

Now, I want to also show an aggregation at 10hz (100ms):

    //ESTABLISH A FILTER THAT ALLOWS FOR DATA AGGREGATION AT AN 10HZ BASIS

  TIMESTAMP(FLOOR([ts],100/(24*60*60*1000))) as [RESULT TIMESTAMP 10HZ],

I am not getting the results intended. What am I missing in the above code? I suspect I am off on my * or x/ values.

1 Reply
guruprem
Partner - Creator III
Partner - Creator III

I guess floor is the culprit here.

In Qlik the decimal part of time is not broken into 24*60*60 secs. What I mean is time(42000.25) will result 6.00.00 hrs. Qlik can calculate the time in millisecond, can you try getting the number whith is equalent to timestamp in milli second then try =timestamp(datetime,'MM/DD/YYYY hh:mm:ss.fff') to print in ms.