标题:关于c#日期查询问题
取消只看楼主
lukebc
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:3
帖 子:74
专家分:32
注 册:2009-8-18
结帖率:71.43%
 问题点数:0 回复次数:0 
关于c#日期查询问题
string time1 = rkrq1.Value.ToShortDateString();
string time2 = rkrq2.Value.ToShortDateString();
           
            if (time1.Trim() != "")
            {
                cond = cond + "and 日期>=" + time1;
            }
            if (time2.Trim() != "")
            {
                cond = cond + "and 日期>=" + time2;
            }
if (cond != "")
            {
                sql = "select * from rkb where 1=1  " + cond;
            }
            else
            {
                sql = "select * from rkb";
            }
2016-09-19 12:37



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-468936-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.297839 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved