I am trying to establish if a date falls between two dates including the start and finish dates
Can someone please explain why this code doesn't work
If TargetDate >= StartDate AndAlso TargetDate <= EndDate Then
It works correctly if the StartDate and The EndDate are dates before and after the target date, but if either the StartDate or the EndDate is the same as the TargetDate it fails. It also fails if the dates are all the same.
I need to be able to include both the Start and End Dates and I would have thought that the = sign would have been sufficient.
Many Thanks in advance for any assistance