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!

有帮助吗?

解决方案

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);
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top