Skip to content
Advertisement

Fetched Date is setting incorrectly

So for example I save Date to database:

JavaScript

And it is saved to database as this date for example 2021-09-01. Then I fetch this date and add two day for example and it should be 2021-09-03. This is the code:

JavaScript

But the result I get is not the correct I want, because I get this:

JavaScript

is should be

JavaScript

How I should fix this?

Advertisement

Answer

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement