mardi 3 janvier 2017

Datediff function not recognizing the change

I'm using a DateDiff function but for some reason it's not recognizing the difference in 2 dates that i feed it....here's what it looks like....

FirstDate = "07/31/2016"
SecondDate = "07/01/2016"

If DateDiff("d", CDate(firstDate), CDate(SecondDate)) > 1 then
   msgbox "Something"
End if

In this case it goes right to the end of the statement. WHY?

Aucun commentaire:

Enregistrer un commentaire