Pergunta

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!

Foi útil?

Solução

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 em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top