Re: Help needed with asp date()
OK the trouble is that once you've gotten the data from the database it's just a string.
01/06/2006 is less than
02/06/2005 because the most significant digit in the second data (2) is greater than the most significant digit from the first date (1).
you need to edit the sql statement to do the selecting for you.
sql = "select * from specaloffer where fromdate <= Cdate(now) AND todate >= cDate(now)"
(that will only select offeres where the dates are valid (assuming that the fields are set as date fields and not text fields in the databse).
I didn’t fight my way to the top of the food chain to be a vegetarian…
Im sick of people saying 'dont waste paper'. If trees wanted to live, they'd all carry guns.
"The inherent vice of capitalism is the unequal sharing of blessings; The inherent vice of socialism is the equal sharing of miseries."