Dates

go2review.com

Registered User.
Local time
Today, 13:11
Joined
Mar 31, 2009
Messages
13
I have a data base with dates in, these are dates when contracts expire

I want a query where it shows all contracts that are due 28 to expire within 28 days

The expiry dates will differ
 
not sure if that will work

if i have dates upto a 1000 for eg

12/01/07
14/05/07
31/12/07

these are contract expire dates and i want a report that contracts that are due to expire 28 days before does that make sense.
 
A bit puzzled by the dates you have chosen but assuming we are back in 2007 and you run a query on the 1st of Jan, then

Between Datadd("d",-28,Date()) And Date()
will get you the first of those records.

brian
 
sorry about this

they are random dates

we have contracts in out system that have expiry dates for eg

01/08/09
25/03/09
30/01/09

and so on

in a query i want all contracts that are due to expiry in 28 days so out of the example only one contract would appear, i hope this is a better explanation.
 
Not really. today is 3rd April so none of those three dates are within the next 28 days.
I did however misread your first example my formula should obviously have been

Between Date() And Datadd("d",28,Date())

If run today it would find all dates from today until and including !st may, assumong the date field did did not contain time.

Brian
 
ok i will try and explain a little more

contracts have an expiry date and from that point i want to run a query and it finds all the contracts that a re due to expire in a month and earlier so if the expiry date has not changed they will keep re-appearing on the query report until they have been updated.
 

Users who are viewing this thread

Back
Top Bottom