Using datePattern to change the default date and time format

Options

by Dongor7

HTML

<link rel="stylesheet" href="https://s3.amazonaws.com/flexmonster/2.3/demo.css">
<script src="https://cdn.flexmonster.com/flexmonster.js"></script>

<div id="pivot-container"></div>

JavaScript

var pivot = new Flexmonster({
  container: "pivot-container",
  componentFolder: "https://cdn.flexmonster.com/",
  width: "100%",
  height: 430,
  toolbar: true,
  report: {
    dataSource: {
      dataSourceType: "json",
      data: [{
          "date": {
            "type": "datetime"
          },
          "n": {
            "type": "number"
          }
        },
        {
          "date": "10/29/2019 09:00a",
          "n": 1
        },
        {
          "date": "10/29/2019 09:00a",
          "n": 1
        },
        {
          "date": "10/29/2019 09:00a",
          "n": 1
        }
      ]
    },
    options: {
      datePattern: "yyyy-MM-dd HH:mm:ss"
    },
    slice: {
      rows: [{
        uniqueName: "date"
      }],
      columns: [{
        uniqueName: "[Measures]"
      }],
      measures: [{
        uniqueName: "n"
      }],
    }
  }
});