go2review.com
03-31-2009, 07:46 AM
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
Brianwarnock
03-31-2009, 07:54 AM
Lookup DateAdd and then use Between ...And...
Brian
go2review.com
03-31-2009, 07:57 AM
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.
Brianwarnock
03-31-2009, 08:32 AM
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
go2review.com
04-03-2009, 04:57 AM
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.
Brianwarnock
04-03-2009, 05:28 AM
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
go2review.com
04-03-2009, 05:36 AM
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.