[英]Milliseconds to specific date format in javascript
Hello All, I have time in milliseconds and I want convert it into
"dd/mm/yyyy hh:mm:ss"
I have tried the following code in javascript but I failed to do it, What I get is "Thu Jul 07 2016 16:22:10 GMT+0530 (IST)" this full timestamp, Code I tried is as follows: 大家好,我的时间以毫秒为单位,我想将其转换为
"dd/mm/yyyy hh:mm:ss"
我已经在javascript中尝试了以下代码,但未能成功,得到的是“ 2016年7月7日,星期四16:22:10 GMT + 0530(IST)”完整的时间戳记,我尝试的代码如下:
self.users[i].lastLoggedIn = (new Date(self.users[i].lastLoggedIn)).toString("mm/dd/yyyy hh:mm:ss");
Where am I going wrong? 我要去哪里错了? for reference I have attached one screen shot of the same.
作为参考,我附上了相同的一个屏幕截图。 Thank you..!!!
谢谢..!!!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.