Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我得到了日期字符串:
var myDate = "2013-06-07T19:53:00.001+07:00";
我怎样才能将其更改为:
result = "7/6/2013 at 19:53";
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;