Date within last 6 months

  • Thread starter Thread starter Bwana
  • Start date Start date
B

Bwana

Guest
Hi, I've looked through the FAQ but can't find the answer to my question there. I'm sure I'm using the wrong search terms as this must be a common problem. :o

In its simplest form, I have a table with three columns (in actual fact it is a query result, but I don't think that matters) - one column with a date, one with a phone number, the last with a phone plan. I need to extract only those phone numbers that do NOT appear within the last 6 months with the same plan.

In real terms, if Joe Bloggs upgrades his phone plan within 6 months of his last upgrade the company doesn't get paid a bonus. Please help.
 
180 days is approx 6 months so you'll need the following in the where clause
[vbcode]
.[datefield]<(now-180)
[/vbcode]

Have an experiment, and postup what worked :)

Vince
 
ecniv said:
180 days is approx 6 months so you'll need the following in

Why settle for approximates when the DateAdd() function can do it exact.

i.e.

=DateAdd("m", -6, Date())
 

Users who are viewing this thread

Back
Top Bottom