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. Image for the cookie policy date

Please suggest how we convert JSON date in spread sheet?

I have one column with JSON date in Spread Sheet and they show in JSON format ,please suggest mechanism for converting json data in date format. 

1 Reply

SK Shanmugaraja K Syncfusion Team January 11, 2017 12:16 PM UTC

Hi Kuldeep, 
 
Thanks for using Syncfusion products, 
 
We have analyzed your requirement, and we suggest you to use format method for converting date format. Please refer the code examples below, 
 
[JS] 
 
 
        $(function () { 
            $("#Spreadsheet").ejSpreadsheet({ 
                sheets: [{ 
                    rangeSettings: [{ dataSource: window.data }], 
                }], 
                scrollSettings: { 
                    height: 500 
                }, 
                loadComplete: "loadComplete" 
            }); 
        }); 
        function loadComplete() { 
            var xlFormat = this.XLFormat; 
            if (!this.isImport) { 
                xlFormat.format({ "type": "shortdate" }, "E2:E13"); 
            } 
        } 
 
 
 
For your convenience, we have prepared a sample to demonstrate this in JS Playground.  Please refer the below sample link, 
 
 
Also, refer the below number formatting sample for further reference, 
 
 
Please check whether this satisfies your requirement, if not could you please let us know, which format of JSON date that you are using? Or please share your code examples. So that we can work on this and provide you a better solution quickly. 
 
Regards, 
Shanmugaraja K 


Loader.
Up arrow icon