문제

I have the If statement as below. If given values A and B as below, I wonder why the condition will be true in the end as the DateDiff will always return 0 and 0 is not larger than 100. I would appreciate for any comment.

A = ""
B = 100

If DateDiff("n", Me.A, Now()) > Val(Me.B) Then

End If
도움이 되었습니까?

해결책

The datediff function returns the number of minutes since the start of the year 1900 which is a lot more than 100.

I couldn't get it to work with an empty string for A though

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top