to_date(trunc(rk_date) || ' 8:00:00 AM','dd-mon-yyyy hh:mi:ss am')
This ecpression (and all the simmilar you are using) is wrong because you are forcing oracle to use implicit conversion from date to char, which results in unpredictable results and errors in your case. The problem is the following piece:
Code:
trunc(rk_date) || ' 8:00:00 AM'
the first part of the expression results in DATE datatype and if you perform a concatenation on it it must be first converted to CHAR type. So what you realy need is:
Code:
to_date(TO_CHAR(rk_date,'dd-mon-yyyy') ||
' 8:00:00 AM','dd-mon-yyyy hh:mi:ss am')
or even better, more simple and more readable:
Code:
TRUNC(rk_date) + 8/24
Jurij Modic
ASCII a stupid question, get a stupid ANSI
24 hours in a day .... 24 beer in a case .... coincidence?