Date compare [message #331273] |
Wed, 02 July 2008 17:41  |
gkornacki
Messages: 6 Registered: January 2007 Location: Florida
|
Junior Member |
|
|
Can anyone tell me why this produces what it does?
select count(*)
from table
where to_char(timestamp_datefield, 'mmddyyyy') < '01042008'
I get 2652
Where the following gives me.
select count(*)
from table
where to_char(timestamp_datefield, 'yyyy') = '2007'
I get 345264
Am I missing something?
My goal is to write a stored proc to delete records from table that are over 180 days old and this is kind of baffleing me. It should be pretty simple.
|
|
|
|
|