Dates

P

Phil

i have searched the previous posts and cannot find anything that answers my
question.

i have an invoicing facility in my database i would like to know how to
query it to give me people who are within 45 days of starting a course

i have set up a query that gives me all people who due to be invoiced i have
a field StartDate but do not know what criteria to put in so as it only pulls
those people who within 45 days of starting their course

i hope someone can help

thanks

Phil
 
P

Phil

I have tried this

Between DateAdd('d',-45,[StartDate]) And [StartDate]

but this seems to just give me all records that are due to be invoiced for
not within 45 days
 
S

Stephen Glynn

Phil said:
I have tried this

Between DateAdd('d',-45,[StartDate]) And [StartDate]

but this seems to just give me all records that are due to be invoiced for
not within 45 days

:

i have searched the previous posts and cannot find anything that answers my
question.

i have an invoicing facility in my database i would like to know how to
query it to give me people who are within 45 days of starting a course

i have set up a query that gives me all people who due to be invoiced i have
a field StartDate but do not know what criteria to put in so as it only pulls
those people who within 45 days of starting their course

i hope someone can help

thanks

Phil

I think something like

SELECT MyTable.StartDate, DateDiff("y",Date(),[StartDate]) AS MyDate
FROM MyTable
WHERE (((DateDiff("y",Date(),[StartDate]))>0 And
(DateDiff("y",Date(),[StartDate]))<45));

should do it.

Steve
 
V

Van T. Dinh

Between Date() And DateAdd('d',45,Date())

You should also put a condition to check that the course fee hasn't been
paid since there may be attendees that pay in advance of your Query
processing.

--
HTH
Van T. Dinh
MVP (Access)



Phil said:
I have tried this

Between DateAdd('d',-45,[StartDate]) And [StartDate]

but this seems to just give me all records that are due to be invoiced for
not within 45 days

Phil said:
i have searched the previous posts and cannot find anything that answers
my
question.

i have an invoicing facility in my database i would like to know how to
query it to give me people who are within 45 days of starting a course

i have set up a query that gives me all people who due to be invoiced i
have
a field StartDate but do not know what criteria to put in so as it only
pulls
those people who within 45 days of starting their course

i hope someone can help

thanks

Phil
 
P

Phil

Thanks to both of you for the help as i already had the query set up i went
with Van worked great i already have a condition to check that no payment has
been made thanks for the suggestion

Phil

Van T. Dinh said:
Between Date() And DateAdd('d',45,Date())

You should also put a condition to check that the course fee hasn't been
paid since there may be attendees that pay in advance of your Query
processing.

--
HTH
Van T. Dinh
MVP (Access)



Phil said:
I have tried this

Between DateAdd('d',-45,[StartDate]) And [StartDate]

but this seems to just give me all records that are due to be invoiced for
not within 45 days

Phil said:
i have searched the previous posts and cannot find anything that answers
my
question.

i have an invoicing facility in my database i would like to know how to
query it to give me people who are within 45 days of starting a course

i have set up a query that gives me all people who due to be invoiced i
have
a field StartDate but do not know what criteria to put in so as it only
pulls
those people who within 45 days of starting their course

i hope someone can help

thanks

Phil
 
Top