Hi All this is mostly asked question still i didn't find easy and direct way to convert this in to date format.
current format is in
"/Date(1535515200000)/"
if i executed the below line that will give the needed date format. Is there any direct way to get the date format from "/Date(1535515200000)/" to Wed Aug 29 2018 00:00:00 GMT-0400 (Eastern Daylight Time)
new Date(1535515200000)
var s = "/Date(1535515200000)/";
var ts = s.substring(s.indexOf('(')+1,s.lastIndexOf(')'));
console.log(new Date(Number(ts)).toISOString());
Would print "2018-08-29T04:00:00.000Z"
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加