using trunc in oracle
774561May 29 2010 — edited May 30 2010I get this error message saying literal does not match format string every time i type in the simple query below
select trunc(t1.transaction_date) from table_done t1
where trunc(t1.transaction_date, 'YYYY-MM-DD') < '2006-01-01'
and trunc(t1.transaction_date, 'YYYY-MM-DD')>= '2006-12-31';
Kindly note, the main reason, I am doing a trunc is because the date in the table contains hours and mins and I only want to get the years, month and day as string charater for a particular range. Thank you.
I am still new to oracle. thank you