SƲmmēr Aƥ
SƲmmēr Aƥ

Reputation: 2504

VB6 Returned Value from DateDiff

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

Upvotes: 1

Views: 912

Answers (1)

kjack
kjack

Reputation: 2014

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

Upvotes: 2

Related Questions