1、   比如   18:20:42    转换为字符串      182042
 2、   我要的数据是秒数
       如何直接将18:20:42  转换为42  并得到秒的数据
请教!!!   

解决方案 »

  1.   

    Private Sub Form_Load()
    Dim D As Date
    Dim S1
    Dim S As String
    D = "18:20:42"
    S = Replace(CStr(D), ":", "")
    MsgBox S
    S1 = Second(D)
    MsgBox S1
    End Sub
      

  2.   

    Dim iDate as date
    iDate=Date
    Debug.Print Format(iData,"mm")
      

  3.   

    dim strA() as string 
    dim strP as string 
    dim I as integer
    strA=split(time,":")
    strP=""
    for I=Lbound(strA) to Ubound(strA)
        strP=strP & strA(I)
    next I