Finding a date within a range

haroldjclements

Freshman
Joined
Jun 13, 2004
Messages
46
Hello All,

I have set up a contract start date and a contract end date.
I whist to send the method a date and for it to return true if the date is between the contract start and end dates.

My problem is that I don't know how to do this!

Any help will be greatfully received,
Harold Clements

I am using j#.
 
Last edited:
How about just:



PublicFunction IsDateValid(ByVal dateToCheck As DateTime, ByVal startDate As DateTime, ByVal endDate As DateTime) AsBoolean
If dateToCheck >= startDate And dateToCheck <= endDate Then
ReturnTrue


Else
ReturnFalse


EndIf


EndFunction




 
Back
Top