select datediff(dd, getdate(), 截至时间)as leavetime from 招聘信息
where datediff(dd, getdate(), 截至时间)>10思路大概就是这样,你改些东西就行了,
goodluck

解决方案 »

  1.   

    你的checkdate 字段是什么的?
      

  2.   

    checkdate 是一个日期型的字段,大家快帮帮我啊
      

  3.   

    你用的是什么数据库,如果 oracle那就更方便了,系统有一些函数,以前用过。可现在计不得了,如是sqlserver的话xuyo(阿哟) 可以实现,我以前用vb就是这样写的!
      

  4.   

    SELECT* from table where  DATEDIFF(day, getdate(), checkdate)=10
      

  5.   

    我用的sqlserver数据库,哪位老兄知道啊
      

  6.   

    select *
    from 
    where checkdate>getdate() and checkdate<dateadd(day(getdate()),10,getday())
      

  7.   

    上边有点问题
    select *
    from 
    where checkdate>getdate() and checkdate<dateadd(day,10,getday())
      

  8.   

    iewzhao(葳蕤)大哥还是不行,提示WHERE附近有语法错误
      

  9.   

    DATEDIFF 不是很好?不行吗?另外,如果用OLE 引擎,比如ACCESS库则getdate 改成now 就可以了
      

  10.   

    select *
    from table
    where checkdate>getdate() and checkdate<dateadd(day,10,getdate())
      

  11.   

    我的在CS的程序string  conn= "select *from where checkdate>getdate() and checkdate<dateadd(day,10,getday())";
                string  Strconn="server=prgserver;user id=prg;password=prg;database=aq;";
    SqlConnection myconn=new SqlConnection(Strconn);
    SqlCommand  comm= new SqlCommand (conn,myconn);
    SqlDataAdapter da=new SqlDataAdapter(conn,myconn);
    DataSet ds=new DataSet();
    da.Fill(ds,"T_DfEmployee"); myconn.Open ();
                DataGrid1.DataSource =comm.ExecuteReader ();
    DataGrid1.DataBind ();
    myconn.Close ();
      

  12.   

    getday() 是我写错了!是getdate()