Subtract or Add Operation On Current DateTime in Javascript

Last Updated on

This blog will show you how to manipulate current date by adding or subtracting time. it will also show you how to manipulate any custom date or the current date.

You can add or delete any number of days from the current date.

//——– To add any number of hours in the current date time———//

// —–To subtract  particular time from current time. Below example will reduce time by 5 hours and 30 minutes——//

// —–To Add or Subtract particular time from any custom date time. Below example will reduce time by 5 hours and 30 minutes——//

Lets take a random date as “2020-07-18 21:32:20”

 

Leave a Reply

Your email address will not be published. Required fields are marked *