Hi. I'm trying to compare 2 dates to see if they match up (e.g. 1/05/2011 and 1/05/2011) but I'm doing something wrong. So my question is, how do I get rid of the seconds in the code below?

Code:
y = DateAdd("d", -daypas + x, Now)
This creates #2011-05-01 13:22:40# but I want it to be #2011-05-01#

Formating it (d/mm/yyyy) creates a string (when I store it in a text file) and when I do this even though the two dates look the same (the other date is created by a calendar control) VB doesn't see a match. So any ideas? Thanks.