We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to specify formate for Date Row or Column

Thread ID:





124037 May 11,2016 01:12 AM UTC Mar 22,2017 12:23 PM UTC ASP.NET MVC 5
Tags: PivotGrid
Jeffrey Stone
Asked On May 11, 2016 01:12 AM UTC

With the PivotGrid control is there a way to specify the format for a row or column that is a date value? Here is an example of how a row is currently displaying: "Tue May 10 2016 00:00:00 GMT0-0400 (Eastern Standard Time)". I would like for it to display as 05/10/2016.

Regards, Jeff

Ramesh Govindaraj [Syncfusion]
Replied On May 11, 2016 11:05 AM UTC

Hi Jeffrey,

Thank you for contacting Syncfusion support.

We have created an incident to log an improvement task on behalf of you. Our support engineer will assist you through incident. We request you to follow with the incident for further details.

Ramesh G. 

Replied On March 17, 2017 10:26 AM UTC

How did you solve the problem?

Sastha Prathap Selvamoorthy [Syncfusion]
Replied On March 20, 2017 12:55 PM UTC

Hi Manola, 
We have created an incident behalf of you for your requirement. And, we have updated the way to achieve your requirement in the incident. Please find the below link to redirect the incident. 
Note: We have already mentioned this in our previous update in the forum. 
If this doesn’t meets your requirement. Kindly provide us more information about your requirement which would be helpful for us to proceed further. 
Sastha Prathap S. 

Replied On March 21, 2017 08:40 AM UTC


I'm sorry, but I can't find the solution. This post was created in 2016.

In your link, I can't see the solution, only my support tracks, but it is not mine.

Can you post the solution?

Ramesh Govindaraj [Syncfusion]
Replied On March 22, 2017 12:23 PM UTC

Hi Manolo, 

We regret you to inform that, for relational data source, it is not possible to change row/column headers to required format in PivotGrid internally. But, it can be achieved in sample level by following ways. 
1.       You can directly bind the raw data-set (JOSN data) in desire format for date field to display in PivotGrid. (or) 
2.       You can use the “load” event to convert the desired date format of the datasource data (raw data) and bind it to PivotGrid to change the formatting in desired headers. Please find the below code example to achieve this. 
Sample Code: 
    function onLoad(args) { 
        for (var i = 0; i < pivot_dataset.length; i++) { 
            var val = (pivot_dataset[i])["Date"];     // Select field to set desired date format 
            val = new Date(val); 
            //ej.widgetBase.formatting("{0:" + DateTime format string + "}", value, localization); 
            pivot_dataset[i].Date = ej.widgetBase.formatting("{0:" + "MM'/'dd'/'yyyy" + "}", val, "es-ES");   // To convert the date format as per the applied format string and localization 
        args.model.dataSource.data = pivot_dataset; 

Thanks and Regards, 
Ramesh G


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon