If DayDifference <= 1 Then
If hour = 23 Or hour <= 2 Then
IsValid = True
If hour = 2 And min > 0 Then
IsValid= False
End If
Else
IsValid = False
End If
Else
IsValid = False
End If
daydifference = DateDiff("d", datevalue1, datevalue2)
hour = DatePart("h", datevalue1)
If daydifference <= 1 Then
If hour >= 23 Or hour <= 2 Then
IsValid = True
If hour = 2 And min > 0 Then
IsValid = False
End If
Else
IsValid = False
End If
Else
IsValid = False
End If
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.