私はこのような文字列を持っています。正しい形式で日付を表示するにはどうすればよいですか?これで、 "Test Date": "/ Date(1468783153887)/"のように表示されます。私はjqueryの関数内で文字列値を代入しています:正しい形式の日付を表示
[{"RowIndex":1,"ObjectId":600290,"SpaceId":null,"Xposition":null,"Yposition":null,"Angle":null,"DrawingId":18137,"BlockRefHandle":"3DE","ObjectClassId":9387,"SymbolId":null,"ScaleFactor":null,"SymbolColor":120,"IsBlockBased":true,"NumberWithClassName":"DR-1040318 (Doors)","ObjectNo":"DR-1040318","ObjectClassName":"Doors","Equipment":"Doors","Address":"123:7yt","NFPA Classification":null,"Health Classification":null,"Test Method":"Functional","Test Result":"Passed","Test Date":"\/Date(1468783153887)\/","Dev. Reading":null,"Dev. Reading Date":"\/Date(1468783153887)\/","Barcode":null,"Site":"4433-75006-00045","Building":"Building Test","Floor":"Floor Test","Status":"Assigned","Attachments":"None","sfde":null,"Attribute for test - not mand":null,"Attribute for test":null,"Test Attribute":null,"intsi":null,"uiiiiiii":null,"Note":null,"s667":null,"sg":null,"ui":null,"My Attribute":null,"Comment":null,"Comments":null,"Location":null,"test12":null,"abcd":null,"Activate1":null,"Activating":null,"Activating Device Address":null,"Activating Device Location":null,"Shutdown Device Type":null,"Test2":null,"vvvd":null}]
機能
function toolTipFulldata(i, columnAlias) {// building contents to tooltip
var html = '';//'<table border="1">';
$.each(dataForToolTip[i], function (key, value) {
for (var j = 0; j < columnAlias.length; j++) {
if (key == columnAlias[j]) {
if (value == null)
value = "";
html += '<span>' + key + '</span>';
html += '<span style="color:blue;">' + ":" + value + '</span></br>';
}
}
});
$("#showTooltip").html(html);
};
は、我々はその文字列内の適切な形式で日付を取得するために何かをすることはできますか?これらを仮定
まず変換する日付がであるどのような形式を確認します。 –
はhttp://stackoverflow.com/questions/4673527/を参照してください。変換ミリ秒から日付のjquery-js –