Start date is 09-20-2012 //(mm-dd-yyy)
End date is 09-24-2012
then no. of days would be 5 which is stored in some variable say "value"//Added some logic to get number of days
What I am doing is i am iterating until value is 5 and adding "value " to start date at each iteration. which is below
- Code: Select all
for(var i-0;i<value;i++)
{
startdate.setDate(startdate.getDate()+i) ////stores original value in "startdate"
//some Code & store value in new record in table
//Result should be 09-20-2012, 09-21-2012 09-22-2012 // So on....
}
Somehow I am not able to get to add value 1 to startdate. Where I went wrong. Any suggestions.