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

Please suggest how we convert JSON date in spread sheet?

Thread ID:

Created:

Updated:

Platform:

Replies:

128238 Jan 10,2017 10:36 AM UTC Jan 11,2017 12:16 PM UTC JavaScript 1
loading
Tags: ejSpreadSheet
kuldeep
Asked On January 10, 2017 10:36 AM UTC

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. 

Shanmugaraja K [Syncfusion]
Replied On 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 


CONFIRMATION

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.

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

;