sql syntax to compare date in range
Posted on 2014-11-06
I am comparing a date with two entries made my the user. User wants to display all results for one single day, say today. So they enter 11/06/2014 for both start and end dates (MMColParam3 and MMColParam4)
I would think that the where clause below would display the results, but it doesn't. I need to enter 11/06/2014 to 11/07/2014 to get results where b.apymntdate is 110/06/2014
How can I fix it so that if user enters the same date in both start and end date and if b.apymntdate is the same date it WILL display the results.
WHERE b.apymntdate >= 'MMColParam3' and b.apymntdate <= 'MMColParam4'