I am using sql*plus to write a report. I would like for the current date (and time if possible) to be displayed in the title of my report (TTITLE.) It appears that I'm supposed to use a system variable called, _DATE, but I'm not sure what to do. I'm running sql*plus v.10.2.
Here is my code. How can I include the current date to be displayed in the "RIGHT" side of the TTITLE heading?
TTITLE ON
TTITLE LEFT 'MY COMPANY' CENTER 'Weekly Invoice Totals for Cost Center: 10 - MANAGEMENT' RIGHT 'Date: '
set pagesize 66
set linesize 120
set wrap off
column vendor_name heading 'Supplier' format a40
column invoice_num heading 'Invoice Number' format a30
column invoice_amount heading 'Invoice Amount' format 999,999,999.99
set underline =
compute sum label TOTAL of invoice_amount on vendor_name
break on vendor_name skip 2
SELECT
po_v.vendor_name,
ap_inv.invoice_num,
ap_inv.invoice_amount,
FROM
ap.ap_invoices_all ap_inv,
po.po_vendors po_v,
WHERE
ap_inv.vendor_id = po_v.vendor_id and
ap_inv.creation_date > SYSDATE-10;