How to change the display format dataTime for json?

When I output the date and time from the database, it is displayed this way
Tue Dec 12 2017 02:03:00 GMT+0000 (GMT time GMT (winter))

Fully displays such as this:
Tue Dec 12 2017 02:03:00 GMT+0000 (GMT time GMT (winter)) 4min. Description:duntik2

I need remove the date in this format
dd/mm/yr time-(time+duration)

That is, the output would be:
Tue Dec 12 2017 02:03 - 02:07 Description:duntik2

Here is the code:

$.ajax({
 url: url,
 type: 'GET',
 dataType: 'json',
 success: function (data) {
 var ul= $("#list_of_appointments");
 for (i=0; i<data.length; i++){ var date=new date(data[i].date_time); li="<li><span class='date_time'>" + " < span>" +
 "<span class="duration" duration>" + data[i].duration + "min.</span>" +
 "<span class="description">" + data[i].description +
 "</span>" + "<input type="hidden" value=" + data[i].id + ">";
ul.append(li);
}
 });</data.length;>


Help to change code to this please.
June 10th 19 at 15:05
1 answer
June 10th 19 at 15:07
Solution

Find more questions by tags JSONAJAXjQuery