如何判断两个时间段(A B) 是否在 另两个时间段(C D)中时间精确到分钟?
如何判断两个时间段(A B) 是否在 另两个时间段(C D)中时间精确到分钟 ??
都存到Date型变量里,然后直接比较就行了
Dim A As Date
Dim B As Date
Dim C As Date
Dim D As Date
A = CDate("2004-04-05 12:00:00")
B = CDate("2004-04-06 12:00:00")
C = CDate("2004-04-04 12:00:00")
D = CDate("2004-07-05 12:00:00")
If (A<=D) Or (B>=C) Then
'不重叠
End If