I have a dateObject
pulled from my database: 2021-01-02T15:12:05.000Z
. I'd like to add 30 days to that date so that the end date is: 2021-02-01T15:12:05.000Z
. How would I get this to work?
Reading various posts, I've tried:
let storePlanStartDate = dateObject;
storePlanStartDate.setDate(storePlanStartDate.getDate() + 30)
//returns: 1614784325000
I think the return value: 1614784325000
may be what I'm looking for. However, I'm struggling to convert it back to the same format as the original database return so that I can save the updated date.