日期间隔 Long型:
DateDiff("d","日期",Now)

解决方案 »

  1.   

    Now 现在的日期时间
    Date 现在的日期
    Time 现在的时间
    直接用比较符号就可以了,一个日期相当于长整型
      

  2.   

    if format(rs.fields!合同截至日期,"yyyy-mm-dd")>format(date(),"yyyy-mm-dd") then
    '显示记录
    end if
      

  3.   

    不知道你用的后台数据库是什么,如果是SQL SEVER的话先把字段的类型定义为日期型,然后用函数取得当前日期,再比较大小。
      

  4.   

    Now 现在的日期时间
    Date 现在的日期
    Time 现在的时间
    都差不多,试一下就好了。
      

  5.   

    DIM datSYSDATE as date
    datSysdate=date()
    if rs.fields!合同截至日期 >datSysdate then
      '显示记录
    end if
      

  6.   

    Now 现在的日期时间
    Date 现在的日期
    Time 现在的时间
      

  7.   

    如果要获得日期时间的字符串,可以使用如下的代码:
    Dim CurrentDateTime as String
    CurrentDateTime= Format(Now)
      

  8.   

    补充,
    如果要获得日期时间的字符串,可以使用如下的代码:
    Dim CurrentDateTime as String
    CurrentDateTime= Format(Now)
    只获得日期字符串的话,可以这样:
    Dim CurrentDate as String
    CurrentDate= Format(Now,"YYYY-MM-DD")
    以此类推。
      

  9.   

    text1.text=sbrdate
    if text2.text>text1.text then
    execute"........."