Compare current date to 2 dates

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,
How can I compare the current date to 2 other dates. Example:
fDate = Left$(Date$, 2) & Mid$(Date$, 4, 2) & Right$(Date$, 4)
I need a MsgBox to open if fDate is equal to or greater(=>) than Nov. 1,
2004 AND equal to or less than(=<) Nov. 26, 2004.
Thank you for your help,
Terri
 
Don't use strings.

Dim dt as Date
dt = Date ' todays date as an example.
if Dt > DateSerial(2004,11,1) and Dt < DateSerial(2004,11,26) then

End if
 

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

Back
Top