2017  Kodetalk | Feedback | Privacy Policy | Terms | About

how to display millisecond as date and time using jquery

i am getting date and time as millisecond and i want to display it in browser as actual date and time. how will i do using jquery or javascript.

you can directly pass the millisecond to javascript Date and get the date and time.

var datetime = new Date(millisecond);

and print it using datetime.toString();

Answer is