try it
var date = new Date("11/21/1987 16:00:00");
EDIT
You have specified an ISO date. It is also accepted by the constructor of the Date object.
var myDate = new Date("2012-02-10T13:19:11+0000"); var result = myDate.getTime();
Edit
The best I have found is to get rid of the offset manually.
var myDate = new Date("2012-02-10T13:19:11+0000"); var offset = myDate.getTimezoneOffset() * 60 * 1000; var withOffset = myDate.getTime(); var withoutOffset = withOffset - offset; alert(withOffset); alert(withoutOffset);
Seems to work. Regarding issues with converting an ISO string to a Date object, you can link to the provided links.
EDIT
Fixed bug with incorrect conversion to milliseconds according to Prasad19sara comment.
Oybek Feb 10 '12 at 14:33 2012-02-10 14:33
source share