SELECT TO_CHAR(trunc(sysdate-1),'yyyy-mm-dd hh24:mi:ss'),to_char(sysdate-1,'yyyy-mm-dd')||' 23:59:59' from dual