Jump to content
Xtreme .Net Talk

Recommended Posts

Posted (edited)

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#.

Edited by haroldjclements
Posted

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
Return
True

 

 

Else

Return
False

 

 

End
If

 

 

EndFunction

 

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...