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
 
.... WHERE [VisaExp] BETWEEN Date() AND DateAdd("m", 3, Date())
 
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


.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Date Brackets as an IIf statement 3
records with current year 11
Help with a date Expression 6
Create a Date Query 1
Birthdays within five days 12
Date projections 4
Access Count dates within a Month 4
Awkward query! 1

Back
Top