SQL Script run in KSH Script

I've got a SQL script that is executed through a UNIX ksh script. It is working fine, but I wanted to add a line to put a date/time stamp in the log file that it generates.

This is more of a SQL question, but I'm hoping someone can help me get the date/time...I've changed the script with the bold statement below to find the sysdate, but for some reason, it is displayed twice in the log file. And I don't know how to find the time...

DEFINE LOG_DIR=&1
SPOOL &&LOG_DIR/tf_tbl_daily.log
ALTER SYSTEM FLUSH SHARED_POOL

/
TRUNCATE TABLE tf_tbl;
select sysdate from dual;
/
SPOOL OFF
EXIT

select sysdate from dual;
/

"/" and ";" are functionally the same here. Lose one of them.

select to_char(sysdate, 'mm/dd/yyyy hh24:mi:ss') from dual;

will give you the time.

By the way, why are you flushing the shared pool?

Over the weekend, my DBA pointed out to me that I should not be using that ALTER SYSTEM statement. Don't know why it was added originally, it's not my original code.

Thanks, the date/time statement works great!