2つの日付を比較したいOracleクエリがありますが、それをoracle関数内に配置し、パラメータとして日付を渡すと、次のエラーが発生します。
ORA-01843: not a valid month
ORA-06512: at line 8
Process exited.
そしてこれは私の機能です:
Create or Replace 
FUNCTION GET_MAX_VALUE 
(
  PLAN_DATE IN DATE  
, LOC IN NUMBER  
, RES IN NUMBER  
, TIS IN NUMBER  
) RETURN NUMBER AS 
units number;
return_val number;
BEGIN
  select ts.booked_units into units from tsm_transaction_tbl ts
  where ts.location_id=loc and ts.resource_id=res and ts.ts_id=tis and ts.trans_date=to_date(plan_date,'mm/dd/yyyy');
  RETURN units;
END GET_MAX_VALUE;