Does anyone know how to retrieve this specific time format using Angular2 TypeScript?
2016-9-25T05:10:04.106Z
I've tried searching online but couldn't find a straightforward solution.
When attempting this in TypeScript, the following results are returned:
Date.now(); //1474804051687 timestamp
new Date; //Sun Sep 25 2016 17:14:45 GMT+0530
In JavaScript, we can obtain that format by using:
new Date; //2016-9-25T05:10:04.106Z
I'm unsure of what I'm missing here. Can someone provide guidance on resolving this issue?