Reputation: 401
In AngularJS I'm trying to use the Date() function to get milliseconds from
'2014-11-19 10:58:16'
With this function
var n = new Date.parse('2014-11-19 10:58:16');
But I'm getting a weird error
TypeError: function parse() { [native code] } is not a constructor
How can I fix this?
Upvotes: 0
Views: 67
Reputation: 401
As Frédéric Hamidi posted in the comment I shouldn't have used
new Date
but
Date
Thank you Frédéric Hamidi
Upvotes: 1