Date Query

F

Frank

I have dates in a table that correspond to instructors
dates of transfer. I need to create a query that pulls up
all instructors that are leaving within 30 days. For
example, if I run the query today (December 7th) and an
instructor transfers on January 1st, the query would pull
his name up as a loss. I hope this makes sense

Thanks,
Frank
 
G

Guest

SELECT yourtablename.*
where
datediff("d" , yourtablename.[datefield), now() ) < 30
 
J

John Vinson

I have dates in a table that correspond to instructors
dates of transfer. I need to create a query that pulls up
all instructors that are leaving within 30 days. For
example, if I run the query today (December 7th) and an
instructor transfers on January 1st, the query would pull
his name up as a loss. I hope this makes sense

You should be able to use a criterion on DateOfTransfer of

BETWEEN Date() AND DateAdd("d", 30, Date())


John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 

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