Dear visitor, despite the COVID-19 outbreak, our team continues operating at full speed.

Also, here is the form where you can apply for a special discount and we will contact you with possible options. Stay safe and continue achieving your business goals.

Fill the form
Get Free Trial
Get Free Trial

How to display aggregated time values in hh:mm:ss format?

Eric Malalel asked on December 21, 2018

I need to aggregate time values at different hierarchy levels: time spent on a lesson, a course (multiple lessons), a training (multiple courses).
The data is stored in a MySQL column with data type TIME.
I first tried to aggregate by using SUM on the value, but it does not work.
So I add the TIME_TO_SEC function to my SQL request. Then I get all times in seconds and the SUM function works fine.
But I need to present the result in hours:minutes:seconds format.
My users want to read 01:30:25 and not 5425.
How can I do that? For instance, is it possible to use custom Javascript to format the cells?
Or is there another way of doing this?

1 answer

Public
Dmytro Zvazhii Flexmonster December 24, 2018

Hello Eric,
Thank you for your question. Flexmonster applies time formatting for the fields specified as a time. 
It seems that the data types are not specified for your data source.
Please refer to the following article for specifying the data types: https://www.flexmonster.com/doc/data-types-in-csv/.
Also here is more information about applying an appropriate date and time patterns: https://www.flexmonster.com/doc/date-and-time-formatting/.
Please let us know if everything works fine for you.
Regards,
Dmytro

This question is now closed