Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
puneetagarwal
Partner - Creator II
Partner - Creator II

Convert Milliseconds to Seconds

Hi All,

We have a column in db where the values gets store in Milliseconds (Bigint), I need to covert the Milliseconds value into seconds in qlikview.

When we export the Data/Excel we should be able to perform Aggregate calculation (Sum,Avg) etc.

Sample Values:

  

TimeInMS Time in Seconds
420000420
26400002640
420000420
120000120
420000420

Regards,

Puneet Agarwal

1 Solution

Accepted Solutions
puneetagarwal
Partner - Creator II
Partner - Creator II
Author

Tried this function , i was successfully able to convert into seconds.

But when i export to excel i am not able to perform the calculation on that column (Avg,Sum) etc.

View solution in original post

15 Replies
Chanty4u
MVP
MVP

try this

=round(Yourfield/1000)

puneetagarwal
Partner - Creator II
Partner - Creator II
Author

Tried, when i export to excel im not able to perform calculation on this column.

That is my major concern.

balabhaskarqlik

=round(TimeinMS/1000) as [Time in Seconds]

=interval(round(YourMillisecondsField/1000)/(60*60*24),'hh:mm:ss') as YourNewField

Chanty4u
MVP
MVP

try this

interval(round(YourMillisecondsField/1000)/(60*60*24),'hh:mm:ss') as YourNewField

sunny_talwar

Is TimeInMs a number or an actual time field?

puneetagarwal
Partner - Creator II
Partner - Creator II
Author

Its a number stored in db (datatype: Bigint)

puneetagarwal
Partner - Creator II
Partner - Creator II
Author

Tried this function , i was successfully able to convert into seconds.

But when i export to excel i am not able to perform the calculation on that column (Avg,Sum) etc.

sunny_talwar

I guess you got what you need... but this could be the other way to do this

=Interval(Interval#(TimeInMS/1000, 'ss'), 'ss')

puneetagarwal
Partner - Creator II
Partner - Creator II
Author

Tried this function , i was successfully able to convert into seconds.

But when i export to excel i am not able to perform the calculation on that column (Avg,Sum) etc.

Note: The user wants to perform the mathematical calculation after exporting the excel on this column.