have problem for format date in JavaScript, this is my function code
//originalDate = \'2016-03-02 09:12:14.989522\'; var d = new Date(originalDate),
First parse your original date then use it in your code.
var MilliSecond=Date.parse(originalDate); var d=new Date(MilliSecond), month=d.getMonth()+1, day=d.getDay(), .......