How to properly get the date 3 days before the given, if I have a format like 07/21/2017 8:30 AM , this is because I use the format of Eonasdan DateTime Picker. But when I try to minus it with 3 days I got Fri Jul 21 2017 08:24:14 GMT+0800 (China Standard Time) as my value but my desired output should be the same format like 07/21/2017 8:30 AM. How can I get that the value even I follow my format?
My codes:
var d =new Date('07/21/2017 8:30 AM');
var yesterday = new Date(d.getTime() - (96*60*60));
alert(yesterday);