怎样判断一个字符串是日期类型的!

解决方案 »

  1.   

    isdate() 怎末使呀 能说的具体点吗!?
      

  2.   

    dim strA as string
    strA="fjkdljfj"
    if isdate(strA)=true then
      msgbox "字串strA是日期型"
     else
      msgbox "字串strA不是日期型"
    end if
      

  3.   

    其实这样类似的函数查msdn都会查到的啊
      

  4.   

    不好意思,没看清题目.
    :)TypeName是得到类型,而你的本身就是字符串。
    应该是用isdateThe following example uses the IsDate function to determine whether an expression can be converted to a date: Dim MyDate, YourDate, NoDate, MyCheck
    MyDate = "October 19, 1962": YourDate = #10/19/62#: NoDate = "Hello"
    MyCheck = IsDate(MyDate)            ' Returns True.
    MyCheck = IsDate(YourDate)          ' Returns True.
    MyCheck = IsDate(NoDate)            ' Returns False.
      

  5.   

    if isdate(text1.text) then
        msgbox "是日期型"
    else
        msgbox "不是日期型"
    end if
      

  6.   

    if isdate(text1.text) then
        msgbox "是日期型"
    else
        msgbox "不是日期型"
    end if看见了就顶一下。
      

  7.   

    或者自己编一个和isdate一样功能的函数,很容易(练功?吃饱了?嘿嘿!)