我想这样做:
dim inc as long , J as date
inc = 8
j = 2 h / inc '2:00 / 8
msgbox j 'j = 00:15
range("A1").value = j ' = 00: 15
你可以帮我吗
答案 0 :(得分:0)
我相信这就是你要找的东西:
Public Sub tmpTest()
Dim inc As Long, J As Date
inc = 8
J = "02:00:00"
'or use the following line
'J = TimeSerial(2, 0, 0)
MsgBox CDate(CDbl(J) / 8) 'j = 00:15
Range("A1").Value = CDate(CDbl(J) / 8) ' = 00: 15
End Sub