Monday 15 September 2014

ajax - Convert string to javascript date object -


I am trying to change the UTC date to the current date by the current date on the chart. I'm pretty sure that I'm not using date.parse correctly. Any help is appreciated thanks.

  $ Ajax ({url: "/ chart / ajax_get_chart", // The URL type of the administrator action method data: "Jason", type: "GET", success: function (results) {var results = JSON.parse (results); For the series = []; (var i = 0; i & lt; result.length; i + +) {date = date.parse (result [i] ['date']]; TempArray = [parseFloat (result [ I] ['value']; series. Push (tempArray); series.push (date);}    

You are trying to change the value of the Date.parse function; You have written:

  date.from = result [i ] ['Date'];   

Come PACE CALL needs to be parsed to this function

  date.pars (results [i] ['date'])   

and allot the date to keep the result of this call in some variables.

.

No comments:

Post a Comment