Hi all;
Iâve got my code so far, it works but the wrong way around I want to check if the date / time in label1 (which I get from the DB) is smaller than two minutes comparing with the system date time. But what happens now is when the system date / time is < 2 minutes I get a massage and if it is over 2 minutes then I donât get the message any more, I donât know what I am missing help will be much appreciated.
Code:
Private Sub Command1_Click()
Dim date1 As Date
date1 = Format(label1, "yyyy/mm/dd hh:mm:ss")
If DateDiff("n", date1, Now) < 2 Then
MsgBox ("Not Vending")
End If
End Sub