当前位置:编程学习 > asp >>

.net 每隔半个钟生成一条记录


  DateTime currentDate = Convert.ToDateTime("2012-09-16 00:00");

            DateTime endDate = Convert.ToDateTime("2012-09-16 23:59");
            while (currentDate < endDate)
            {
                DateTime Date = currentDate;
                currentDate = currentDate.AddMinutes(30);
                CreateData cd = new CreateData();
                cd.ExeCuteNonQuery(Date, currentDate);
                //Response.Write(Date + "    " + Convert.ToDateTime(currentDate) + "<br>");
            }

补充:Web开发 , ASP.Net ,
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,