I need help with calculating time difference between times from two different dates.
我需要帮助计算两个不同日期之间的时差。
Cell(1,1) contains: 19/06/2016 01:00:00
Cell(1,2) contains: 20/06/2016 02:30:00
The answer should be: 25:30:00 Following is my code:
答案应该是:25:30:00以下是我的代码:
Dim a As Date, b As Date
a = Cells(1, 1).Value
b = Cells(1, 2).Value
Cells(1, 3).Value = TimeValue(b) - TimeValue(a)
But this code gives me 1:30:00
但是这段代码给了我1:30:00