javascript - Convert a date to Date.now() like format in iavascript -


i need convert date "date.now()" format in javascript. eg. using date.now(), i'm getting value 1395150601449. need date formatted this. how can achieve ? create custom filter in angularjs formatting.

any highly appreciated.

call .gettime() function.

var d = new date(); console.log(d.gettime()); 

you can opposite passing such timestamp date constructor. thus, make copy of date instance:

var copy = new date( d.gettime() ); 

Comments

Popular posts from this blog

android - Inheriting from Theme.AppCompat* -

broadcastreceiver - android BOOT_COMPLETED not received if not activity intent-filter -

basic authentication with http post params android -