how to insert record into database on single button click from date to todate?

前端 未结 2 2044
无人共我
无人共我 2021-01-28 03:39

I have three textbox ... textbox1 and textbox2 and textbox3

I want when I choose from date in textbox1 say 1-May-2011 and to date in textbox2 say 30-May-2011 and in text

2条回答
  •  梦如初夏
    2021-01-28 04:25

    DateTime start = DateTime.Parse("1/1/2010");
    DateTime end = DateTime.Parse("1/30/2010");
    
            while(start <= end)
            {
                Console.WriteLine("Date : " + start.ToShortDateString());
                start = start.AddDays(1);
            }
    

    This will help you get started :)

提交回复
热议问题