Using the following:
var date = new Date(parseInt(jsonDate.substr(6)));
I get:
Mon Feb 22 1993 00:00:00 GMT+0000 (GMT Standard Time)
How do I format this too
22-02-1993
?
Using the following:
var date = new Date(parseInt(jsonDate.substr(6)));
I get:
Mon Feb 22 1993 00:00:00 GMT+0000 (GMT Standard Time)
How do I format this too
22-02-1993
?
 
    
    You use the getFullYear, getMonth (note that the values start with 0), and getDate functions on the Date instance, then assemble a string. (Those links are to the specification, which can be hard to read; MDC does a bit better.)
Or use a library like DateJS (although it hasn't been maintained in quite some time) or as joidegn mentions, moment.js.
 
    
     
    
    var month = date.getMonth();
date.getDate() + "-" + (month >= 10 ? month : '0' + month) + "-" + date.getFullYear();
Read more about Date object in Javascript
