View Single Post
  #3  
Old May 24th, 2004, 11:07 AM
Douglas J. Steele
external usenet poster
 
Posts: n/a
Default Display record based on current date

I think you're going to need:

WHERE StartDate = CLng(Format(Date(), "yyyymmdd")) And EndDate =
CLng(Format(Date(), "yyyymmdd"))

From the Immediate window:

?CLng(Date())
38131
?CLng(Format(Date(), "yyyymmdd"))
20040524


--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"tina" wrote in message
...
criteria in a query would be, roughly,

WHERE StartDate = Date() And EndDate = Date()

hth


"John H" wrote in message
...
I would like to select records that are valid based on todays date. In

this case the records startdate and enddate need to be between todays

date.

My table has 2 fields stardate and enddate yyyymmdd format as the

datatype
is long int.

An example would be if todays date is 24-05-04 it would return records

where 20040524 is between the start and end dates.

John H