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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Date fields in JSON data are not formatted properly in ajax post

Problem

The date column value is obtained in the format “\ /Date(628318530718)\/.

Cause

The date value is not formatted when it is retrieved from the server via AJAX post.

Solution

The unformatted JSON date value can be formatted by ej.parseJSON function in the AJAX success event.

JS

 

Article ID: Published Date: Last Revised Date: Platform: Control: .NET Framework:
3017 12/10/2014 08/05/2015 ASP.NET MVC Grid 4.5.1
Did you find this information helpful?
Comments
Steve Taylor Sep 15, 2016
How do you handle Time Zones in the ej.parseJSON function?  I'm getting an issue because my dates are off by a couple of hours.
Reply
Alan Sangeeth S [Syncfusion] Dec 27, 2016

Hi Steve,


To resolve the issue with Time zones, you can use the ej.serverTimezoneOffset. Please refer the following UG documentation for this helper function

 

https://help.syncfusion.com/js/datamanager/helper-functions

 

Note: In the above documentation, we have a typo error, that ‘z’ in serverTimezoneoffset is mistakenly capitalized and it should be in smaller case “ej.serverTimezoneOffset”. We will update this correction and it will be refreshed online soon.

 

Regards,
Alan Sangeeth S 

Reply
Mangala Jan 04, 2017
Hi, 

I am facing same issue. But when I am trying to use the above code for parsing the data, it says 'ej is not defined'. Is there any reference jquery file to be used? Why it is not working for me?
Reply
Add Comment
You must log in to leave a comment

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