Use Date Inside Pivot Value Cell


1 comment

  • Avatar
    Delsaran Bigglesworth

    I ended up figuring out a suitable solution to my problem. The step were as follows, I converted the date into on Integer with this chunk of sql.


    After I had an Integer representation of a date in the cell I used some Jquery to format it the way I wanted. Using this in the "Edit Script" section.

    widget.on('ready', function(){
    $("div.table-grid__tbody div.table-grid__content__inner").map(function(i, cell) {

    var input = cell.innerHTML.replace(/(\d\d\d\d)(\d\d)(\d\d)/, "$2/$3/$1");
    // console.log('input');
    // console.log(input);

    cell.innerHTML = input;

    It's not perfect, there are some dates that look weird, but it's closer to my end goal. I hope this helps someone in the future. 

    fyi this was on Linux version.

    Comment actions Permalink

Please sign in to leave a comment.