The question is simple, how can I add days to a date in YYYY-MM-DD format?
For example, increment a date given in this format: "2013-02-11" to "2013-02-12"?
YYYY/MM/DD. Four-digit year, separator, two-digit month, separator, two-digit day (example: 1999/12/15) DD/MM/YYYY. Two-digit day, separator, two-digit month, separator, four-digit year (example: 15/12/1999)
First, pick the cells that contain dates, then right-click and select Format Cells. Select Custom in the Number Tab, then type 'dd-mmm-yyyy' in the Type text box, then click okay. It will format the dates you specify.
The correct format of your date of birth should be in dd/mm/yyyy. For example, if your date of birth is 9th October 1984, then it will be mentioned as 09/10/1984.
var tempDate = new Date("2021-09-21"); var formattedDate = [tempDate. getMonth() + 1, tempDate. getDate(), tempDate. getFullYear()].
date = new Date('2013-02-11');
next_date = new Date(date.setDate(date.getDate() + 1));
here's a demo http://jsfiddle.net/MEptb/
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