时间的比较以及数据库中的时间范围搜索

Posted on 2013-07-21 10:55  KathyStone  阅读(239)  评论(0)    收藏  举报

if(Convert.ToDateTime(this.textbox1.text)>Convert.ToDateTime(this.textbox2.text))

{

condition+=" and TaskTime between convert(datetime, " +this.textbox1.text+“ , 102) and convert(datetime, " +this.textbox2.text+“ , 102)";

}

博客园  ©  2004-2026
浙公网安备 33010602011771号 浙ICP备2021040463号-3