I have a date from which I need to extract just the hours and minutes.
The date is displayed in “2012-11-27 13:36:00” format. So I need just 13:36.
I did something like this
var currTime = this.event_start;
alert(currTime);
var jsFormat = new Date(currTime);
alert(jsFormat);
currtime gives the correct date whereas jsFormat alerts a undefined.
You could always do it the easy way 🙂