If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Figure months from a anchor date
Lets say a child was born on 5-15-2004. (dob = Field 1)
There is an immunization SERVICE date (Field 2) of 5-18-2005 I need to write a query that will show me ONLY the children that had a SERVICE DATE (above) within 12 months. Any help will be appreciated Buck |
#2
|
|||
|
|||
Figure months from a anchor date
On Mon, 19 Feb 2007 11:34:00 -0800, buckpeace
wrote: Lets say a child was born on 5-15-2004. (dob = Field 1) There is an immunization SERVICE date (Field 2) of 5-18-2005 I need to write a query that will show me ONLY the children that had a SERVICE DATE (above) within 12 months. Any help will be appreciated Buck SELECT whatever FROM your table name WHERE DateDiff("m", [DOB], [SERVICE DATE]) = 12 John W. Vinson [MVP] |
#3
|
|||
|
|||
Figure months from a anchor date
buckpeace wrote:
Lets say a child was born on 5-15-2004. (dob = Field 1) There is an immunization SERVICE date (Field 2) of 5-18-2005 I need to write a query that will show me ONLY the children that had a SERVICE DATE (above) within 12 months. Any help will be appreciated SELECT * FROM table WHERE servicedate = DateAdd("yyyy", 1, dob) or WHERE servicedate = DateAdd("m", 12, dob) -- Marsh MVP [MS Access] |
Thread Tools | |
Display Modes | |
|
|