How can I get the starting time of a particular dateobject in milliseconds? my dateobject is in below format.
Sun Oct 16 2016 21:33:35 GMT+0530 (India Standard Time)
My input
dateobject = Sun Oct 16 2016 21:33:35 GMT+0530 (India Standard Time);
Required Output
Sun Oct 16 2016 00:00:00 GMT+0530 (India Standard Time)
Irrespective of time, I want to get the starting time of this date in milliseconds(i.e Sun Oct 16 2016 00:00:00 GMT+0530 (India Standard Time)? Sun Oct 16 2016 21:33:35 GMT+0530 (India Standard Time) -> Sun Oct 16 2016 00:00:00 GMT+0530 (India Standard Time)->1476556200000
I tried like this.
var date_form = $filter('dateobject')(toDate, 'yyyy/MM/dd');
(date_form=2016/10/16)
var full_date = new Date($filter('date')(date_form, 'fullDate'));
(full_date = Oct 16 2016 00:00:00 GMT+0530 (India Standard Time))
var milliseconds = full_date.getMilliseconds();
I am not getting the proper output? Is this correct one?