I want to check whether a date is between start date and end date.
i have added a where clause
where datepaid between '2010-04-01' AND '2010-04-15'
but the problem is that it excludes '2010-04-15'.
It should include end date also how can i do this?
Please help me on this
Regards,
pankaj
Specify the time parts explicitly:
WHERE datepaid BETWEEN '2010-04-01 00:00:00' AND '2010-04-15 23:59:59'
Perhaps your dates include intraday times. Try this instead:
where '2010-04-01' <= datepaid AND datepaid < '2010-04-16'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With