Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

todays date greater than a Date?????

Status
Not open for further replies.

mdang

Technical User
Mar 2, 2004
3
US
Hi EVeryone,

I am trying to compare a DATE from a database that is DateTime format
------------------------------
dDate = FormatDateTime(day(rs("eventdate")) & "/" & month(rs("eventdate")) & "/" & year(rs("eventdate")),2)
---------------------------------

comparing with a DATE like this
-------------------------------------
baseDate1 = FormatDateTime(date(),2)
--------------------------------

Then use an IF Statement like this it doesn't work?????
------------------------------------
if (dDate = baseDate1)then



WHY WHY??????????
 
change date() to now()

baseDate1 = FormatDateTime(now(),2)

also try response.wrting the dates to the browser to ensure that they are there...

hth Bastien

There are many ways to skin this cat,
but it still tastes like chicken
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top