if date in another field is between two dates

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

For example, Table has date fields ([30 day], [90 day], [120 day]) based on
clients admission date.

Also has fields for Outcomes ([30 day outcome], [90 day outcome], [120 day
outcome]).

In my query, I want the [30 day outcome] to display ONLY if the [30 day]
field is Between [Enter Start Date] And [Enter End Date]

Does this make sense???
 
vikgarden said:
For example, Table has date fields ([30 day], [90 day], [120 day]) based on
clients admission date.

Also has fields for Outcomes ([30 day outcome], [90 day outcome], [120 day
outcome]).

In my query, I want the [30 day outcome] to display ONLY if the [30 day]
field is Between [Enter Start Date] And [Enter End Date]

Does this make sense???

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Yes, it makes sense, BUT, your table design is such (un-Normalized) that
the query to get that info would be a PITA. Normalize your table. If
you don't know how to do that read a book about DB design. I usually
recommend _Database Design for Mere Mortals_ by Hernandez.

To discover the date range use date addition functions and the
AdmissionDate. E.g.:

Admission was within 30 days of current date:

WHERE AdmissionDate BETWEEN Date()-30 And Date()

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQnG9s4echKqOuFEgEQJkMwCg7xr3rgsUCU4RmRGxlkI6sg6FZq0AoNGz
SRjDjh1rtkdjWAofjoFooONz
=OzeO
-----END PGP SIGNATURE-----
 
Back
Top