date diff?

  • Thread starter Thread starter Leslie S
  • Start date Start date
L

Leslie S

Hi,

I'm trying to identify Visa dates that will expire within
the next three months. I have a date field called
VisaExp, but I can't figure out what what critera to use
in my query to deal with both the month and year.

Any help would be most appreciated.

Thanks.

Leslie
 
Hi,


DateSerial( YearEnd, MonthEnd + 1, 1 ) - 1


<= DateAdd("m", 3, Date( ) )




should do. Note that you can re-write the first expression like:


DateSerial( YearEnd, MonthEnd + 1, 0 )

but may be a little bit less self-evident.

Hoping it may help,
Vanderghast, Access MVP
 
Thanks, that did it.
-----Original Message-----
.... WHERE [VisaExp] BETWEEN Date() AND DateAdd("m", 3, Date())

--
HTH
Van T. Dinh
MVP (Access)



Hi,

I'm trying to identify Visa dates that will expire within
the next three months. I have a date field called
VisaExp, but I can't figure out what what critera to use
in my query to deal with both the month and year.

Any help would be most appreciated.

Thanks.

Leslie


.
 
Back
Top