Link to home
Start Free TrialLog in
Avatar of AWestEng
AWestEngFlag for Sweden

asked on

Check if date is between two dates

Hi

Is there a function in vs 2005 (vb.net) to check if a date is between two dates?

Thx

SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi Idle_Mind
In the months that I am an EE member, your comments have helped me a lot.
Just a question. I think that the AndAlso statement will not check the 2nd condition if the first is true, -but- I am confused with the difference of And - AndAlso

I have the habbit when explaining something (I was teaching in the past) to make small statment that the other will understand. Indeed your code is better formed!
You've got the idea...but stated it backwards.  ;)

"AndAlso" is known as a "short circuited" boolean operator.  It does NOT check the second expression if the first is FALSE since the resulting "And" operation cannot be True with the one operand already evaluated as False.

Some documentation:
http://msdn2.microsoft.com/en-us/library/wz3k228a(vs.71).aspx
http://support.microsoft.com/kb/817250
Thank you :)