并且什么函数可以把这样的数据转化使其可以和数据库中的日期字段比较?
  谢谢了

解决方案 »

  1.   

    转:
    private sub text1_lostfocus()
        if trim(text1.text)<>"" then
            if not isdate(text1.text) then
                msgbox "非法日期,请重新输入!",48,"提示"
                text1.setfocus
                exit sub
            else
                text1.text=format(text1.text,"YYYY-MM-DD")
            end if
        end if
    end sub
      

  2.   

    用isdate判断if isdate(input) then
      ....
    else
      ...
    end if