How can I compare just the dates of timestamps while ignoring the times?
I just want to compare the month/date/year. For example:
select * from Batch
where openingtime <> closingtime
The problem is that this will show too many batches, since it will include batches where OpeningTime
and ClosingTime
differ only in the time of day:
OpeningTime = 2010-07-07 11:19:29.000
ClosingTime = 2010-07-07 19:19:22.000