ta mu

ta mu

  • NA
  • 201
  • 78.4k

increament date

Oct 23 2013 8:02 AM
i want to insert dade values in database using loop but i want first time current date in next itration increament mont by 1 an so on means if current date
is 10/23/2013 in next record it will be 11/23/2013like this

10/23/2013
11/23/2013
12/23/2013
01/23/2014
02/23/2014              can i do this loop is here bu it insert same value in all record i want as mentioned


 int a = Convert.ToInt32(textBox15.Text);
                    for (int i = 1; i <= a; i++)
                    {
                      
                        SqlCommand cmde = new SqlCommand("INSERT INTO add_installment (date) VALUES ('" + dateTimePicker1.Value + "')", my);

                        cmde.ExecuteNonQuery();
                   
                    }



Answers (3)