Your problem seems to be the date conversion in:
Code:
to_char(ar.completed_date,'YYYY-MM-DD hh24:mi:ss') =  '2004-04-30 13:09:59'
Try reversing this to:
Code:
ar.completed_date = TO_DATE('2004-04-30 13:09:59','YYYY-MM-DD hh24:mi:ss')
Good luck!