[thelist] ASP Date Manipulation

Paul Backhouse paul.backhouse at 2cs.com
Tue Mar 19 09:26:09 CST 2002


have you checked that your date field in your database is Date/time?
What format are you adding the date into the database in?

cheers

paul

-----Original Message-----
Here is my code:

pastdate = DateAdd("m",-3,Now())  'pastdate is now three months ago

do while not rs.eof
    if rs("date_completed") > pastdate then  'if date in database is newer
than date three months ago
        response.write pastdate  'show the date
    end if
loop

I tried using both 2/01/02 and 2/01/02 in the database and neither makes the
date show.

Anyone know where I am wrong?

Thanks,
Josh




More information about the thelist mailing list