Forums
 This topic is locked 
             Comparing date and time??
 Posted 25 Apr 2002  09:18:30 
  1 
     has   voted 
  25 Apr 2002  09:18:30 Henrik Sandeberg posted: 
 I have a db (Access 97) with some fields... i want to write a SQL query like this:SELECT * FROM dbname WHERE actualdate <= lastdate
I want the actualdate to check that the page will not show up after the date (lastdate) has been passed over.I will write the lastdate directly in db like 2002-04-25. How can I look for the actualdate, ihave tried date(), but i dont know how to do it,, i use UD4 and IIS4
Anyone?
Replies
 Replied 25 Apr 2002  14:30:56 
   25 Apr 2002  14:30:56 Henrik Sandeberg replied: 
  Solved it......
SELECT * FROM dbname WHERE offtime >= Date() AND ontime <= Date()
  
  SELECT * FROM dbname WHERE offtime >= Date() AND ontime <= Date()