I am calling my server code to return json data
$.ajax({
type: "POST",
url: "myurl",
data: "{}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (appdata) {
var testdata = $.parseJSON(appdata.d);
console.log(testdata);
$.each(testdata, function (index, appt) {
//console.log(appt.PRODUCTID);// works fine
//console.log(appt.ENTRYDATE);// works fine
// var starttime=??
}
});
Here is the console.log(testdata) output
[Object, Object]
0: Object
PRODUCTID : "51",
ENTRYDATE : "2013-02-13T12:30:00",
CATEGORYID : null
__proto__:Object
1: Object
PRODUCTID : "52",
ENTRYDATE : "2013-02-13T12:40:00",
CATEGORYID : null
__proto__: Object
length: 2
__proto__: Array[0]
How can I extract the time information from ENTRYDATE like (12:30) from the first object's entrydate 2013-02-13T12:30:00
Edit
console.log(appt.ENTRYDATE) works fine, the issue only is how to extract time information from appt.ENTRYDATE