javascriptwebdatarocks

To remove :ss part from WebDataRocks "time" JSON type


enter image description here

I only need to use hours and minutes parts. How to use "time" JSON type without as :ss?

Web Data Rocks JSON types

"time" data type usage example which is referred from above document page.


Solution

  • We solved the issue by using customizeCell method,

    function customizeCellFunction(cellBuilder, cellData){
      if(cellData && 
         cellData.hierarchy && 
         cellData.hierarchy.uniqueName==="Duration"     
      ){    
        cellBuilder.text = cellBuilder.text.slice(0,-3)  // HH:MM:ss => HH:MM 
      }
    }
    

    Codepen link : https://codepen.io/AKCAK/pen/KKgXVwp?editors=0010