I have a column titled achieved_date. In my query most of the values for that column are 2016-09-30 23:59:59.997.
I then have a where clause that reads as follows:
WHERE achieved_date between '20160901' and '20160930'
The records with the 2016-09-30 23:59:59.997 value are not being included in my results when they should be. I mean the transaction was recorded on the 30th of September.
Any ideas if this is a odd datatype issue?
'20160930'
is the same a2016-09-30 00:00:00
so yes, that won't include any rows that have a time after midnight