returning dates in a query

S

Stan

I have a database which has two tables of interest. One table
("demographics") contains a single row per patient and the date that therapy
was completed. another table ("followup") contains several rows of followup
data for any given patient, with different information available for each
date of followup.

I want to write a simple query which returns a table that excludes any
followup information within 6 months of completion of therapy. I know that
the expression builder can be used to write something like:
[demographics]![date_of_completion] in the followup_date field,

but how can i incorporate the minimum 6 months between therapy completion
and followup date? the alternative is to do check this manually but seems
like unnecessary effort.

thanks for your help...
 
J

John Spencer

If I understand what you are asking try the following expression
DateAdd("m",6,[demographics].[date_of_completion])

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..

Stan said:
I have a database which has two tables of interest. One table
("demographics") contains a single row per patient and the date that
therapy
was completed. another table ("followup") contains several rows of
followup
data for any given patient, with different information available for each
date of followup.

I want to write a simple query which returns a table that excludes any
followup information within 6 months of completion of therapy. I know that
the expression builder can be used to write something like:
[demographics]![date_of_completion] in the followup_date field,

but how can i incorporate the minimum 6 months between therapy completion
and followup date? the alternative is to do check this manually but seems
like unnecessary effort.

thanks for your help...
 
S

Stan

great - thanks john. worked like a charm.


John Spencer said:
If I understand what you are asking try the following expression
DateAdd("m",6,[demographics].[date_of_completion])

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..

Stan said:
I have a database which has two tables of interest. One table
("demographics") contains a single row per patient and the date that
therapy
was completed. another table ("followup") contains several rows of
followup
data for any given patient, with different information available for each
date of followup.

I want to write a simple query which returns a table that excludes any
followup information within 6 months of completion of therapy. I know that
the expression builder can be used to write something like:
[demographics]![date_of_completion] in the followup_date field,

but how can i incorporate the minimum 6 months between therapy completion
and followup date? the alternative is to do check this manually but seems
like unnecessary effort.

thanks for your help...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top