I want to subtract 5.30 hours from a date, for example, I have a date:
Fri Jan 15 2016 00:00:00
after subtraction, it should be something like,
Thu Jan 14 2016 19:30:00
How I can achieve this. Any help will be appreciated.
try
var date = new Date("Fri Jan 15 2016 00:00:00");
date.setHours(date.getHours()-5);
date.setMinutes(date.getMinutes()-30);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With