-2

我得到了日期字符串:

var myDate = "2013-06-07T19:53:00.001+07:00";

我怎样才能将其更改为:

result = "7/6/2013 at 19:53";
4

1 回答 1

3

jsFiddle

var d = new Date();
var date = d.getDate();
var month = d.getMonth() + 1;
var year = d.getFullYear();

var hours = d.getHours();
var mins = d.getMinutes();

var datestring = month + "/" + date + "/" + year + " at " + hours + ":" + mins;
于 2013-06-07T18:39:44.143 回答