【发布时间】:2016-08-29 01:34:22
【问题描述】:
我一直在尝试找到一种方法来在列表框中显示时间 a 和时间 b 之间的小时数,即使那是数百小时。 注意:tiempoa 也与“现在”一起使用,显然是在时间 b 之前。
Dim tiempoa As Date
Dim tiempob As Date
Dim tiempoc As Date
tiempoa = .Offset(, -18).Value
tiempob = Now
tiempoc = Format(tiempoa - tiempob, "hh:mm")
Data(i, 5) = tiempoc
【问题讨论】:
-
上次你问的时候我在 cmets 里回答了这个问题:把格式改成“[h]:mm”。
-
不起作用@DougGlancy 我也在尝试这个; tiempoa = .Offset(, -18).Value tiempob = 现在 tiempoc = DateDiff(hhh, tiempoa, tiempob) Data(i, 5) = tiempoc