SQL Date Range - Leap Year
I have this query that runs a date range:
SELECT *
FROMPaymentMethods p
LEFT JOIN showparsedemails o
ON o.orderno = p.orderid
WHERE orderid IN (select orderno from pinpoint.dbo.ShowParsedEmails where orderdate >= '2/1/12' AND orderdate <= '2/29/12')
ORDER BY orderdate
This query will not return 2/29/12 dates unless I put the last date to 3/1/2012. Any other months, it will pick up any orders on the start or end date, but will not for leap year.
Any reason why it would do this? How can I fix it?
Thanks in advance.
