ralphtrent
Programmer
I have a end date of 11/6/2009, I need set the start date to 10/31/2009.
Here is my code.
This works great.
If I set my endDate to "10/30/2009", then I would need my start date to be "10/24/2009"
but I am getting "11/24/2009", current month and current year? How do I subtract a date in JS and get the correct date back? I have tried google and search's here but would up down dead ends.
Any help is appreciated.
Thanks,
RalphTrent
Here is my code.
Code:
var endDate = new Date("11/06/2009");
var startDate = new Date();
startDate.setDate(today.getDate()-6)
This works great.
If I set my endDate to "10/30/2009", then I would need my start date to be "10/24/2009"
Code:
var endDate = new Date("10/30/2009");
var startDate = new Date();
startDate.setDate(today.getDate()-6)
Any help is appreciated.
Thanks,
RalphTrent