Pregunta

is there a way to convert a complex time stamp to a simple one using javascript? i'd like to go from:

06-Feb-14 3:15 AM EST

to just:

3:16 AM

thanks!

¿Fue útil?

Solución

I would recommend datejs . You'll have good functionality to do what you need.

One example.

var mydate = Date.parse('2012-02-18 14:28:32');
var result = mydate.toString('dddd MMM yyyy h:mm:ss');
console.log(result);
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top