Showing date field as MM/DD/YYYY
Options
by Flexmonster Pivot Table
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: {
data: getData()
},
slice: {
"rows": [
{
"uniqueName": "FLIGHT_DATE",
"caption": "Flight Date",
"levelName": "FLIGHT_DATE.Month"
}
],
"columns": [
{
"uniqueName": "[Measures]"
}
],
"measures": [
{
"uniqueName": "Price",
"aggregation": "sum"
}
]
}
}
});
function getData() {
return [{
"FLIGHT_DATE": {
caption: "Flight Date",
type: "year/month/day"
},
"Price": {
caption: "Price",
type: "number"
}
}, {
"FLIGHT_DATE": "05/20/2016",
"Price": 1000
}, {
"FLIGHT_DATE": "06/20/2016",
"Price": 1000
}, {
"FLIGHT_DATE": "05/03/2016",
"Price": 1000
}, {
"FLIGHT_DATE": "07/25/2016",
"Price": 1000
}];
}