DTPicker1.Value='2003-5-8'
DTPicker2.Value='16:44:21'    Dim dbNow As Double
    dbNow = Format(Now(), "yyyymmddhhnnss")
    ’dbNow 可能等于 20030508164421此时我想从DTPicker1,DTPicker2得到一个 Double 类型的数据来和 dbNow 比较我改怎么办?

解决方案 »

  1.   

    在线等待到5点半:)让DTPicker1 DTPicker2能够导出一个 20030508173000(2003-05-08,17:30:00 下班)的数值
      

  2.   

    DTPicker1.Value = "2003-5-8"
    DTPicker2.Value = "17:30:00"
    Dim NUM As Double
        Dim dbNow As Double
        dbNow = Format(Now(), "yyyymmddhhnnss")
        'dbNow 可能等于 20030508164421
    '让DTPicker1 DTPicker2能够导出一个 20030508173000(2003-05-08,17:30:00 下班)的数值
    NUM = Format(DTPicker1.Value, "yyyymmdd") & Format(DTPicker2.Value, "hhnnss")
      

  3.   

    提示日期比较可用DateDiff 函数
      

  4.   

    分解得到的字符串不就行啦,如:
    Dim intCount as Integer
    Dim strTemp As String
    Dim strGet  as StringstrTemp=DTPicker1.Value
    For intCount =1 To StrTemp
       If Left(strTemp,1)<>"-" Then
          StrGet=Left(strTemp,1) & StrGet
           StrTemp=Right(strTemp,Len(strTemp)-1)
       End If
    Next
      

  5.   

    kingcom:我操死你妈!不要以为只有你会用马甲!我也会!不要以为你多牛,我鼠标一点就封了你!