Display Current Date on Heading Title (TTITLE)

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;

Hi,
Define a substitution variable, then use that variable in your TTITLE statement:
COLUMN     report_date_col     NEW_VALUE  report_date
SELECT     TO_CHAR ( SYSDATE
          , 'DD-Mon-YYYY'
          )     AS report_date_col
FROM     dual
TTITLE LEFT 'MY COMPANY' CENTER 'Weekly Invoice Totals for Cost Center: 10 - MANAGEMENT' RIGHT 'Date: &report_date' SQL*Plus can't execute functions (like SYSDATE).
To get function results into a substitution variable, you can use the COLUMN ... NEW_VALUE command, as shown above, then call the function in a query.
Note that both the substitution variable and the title are static. That is, if you include the hours-minutes-seconds in the format, and run the SELECT statement at 17:00:00, then execute the TTITLE command at 17:00:05, and run reports at 17:01:00, 17:02:00 and 17:03:00, the title on all the reports will say 17:00:00.

Similar Messages

  • How to display current date in query header?

    Hi,
    How to display current date in query header?
    I use Query Designer for development.
    Thanks,
    Arun KK

    Hi Arun,
    You can define fixed header lines and footer lines so that when you generate the query list, they can receive current values of certain fields. When you define a header line or a footer line, you must specify a character string of the type &field, where field is the short name of a field.
    This function allows you (for example) to place a sort criterion in the header line.
    You can include the following fields as variables in the headers directly:
    %NAME
    Name of the user processing the query
    %DATE
    Current date
    %TIME
    Current time
    %PAGE
    Current page number (6 characters)
    %P
    Current page number (3 characters)
    These fields can be used in the short forms N,D,T and P. If you want to use these letters as short names for query fields, the field values from the query are used.
    You can also see the link
    [http://help.sap.com/saphelp_nw70/helpdata/EN/6e/dd68721faf11d6b1d500508b6b8b11/frameset.htm]
    Regards,
    NR

  • HOW TO DISPLAY CURRENT DATE TIME IN MASTHEAD IN BRANDING IMAGE AREA

    Hi experts,
    I need to display current date time in masthead also and also i should change the welcome area to my own text there how it is possible.....
    and plz tell detail coding also as i dont have idea to change the coding plz help in this............
    where to chan ge and how to change.............
    waiting for u r responses......................
    Regards,
    Shilpa.

    Shilpa,
    go to system administratioon-system configuration-support-support desk-browse deployment-check for com.sap.porta.navigation.masthead.par and download it to nwds.
    when you import it to NWDS jar file will be missing so you need to manually add that to PORTAL-INF/private/lib.
    once you do this go to HeaderiView.jsp in PORTAL-INF/jsp folder.
    write
    <%= new java.util.Date()%> after <hbj:form id="HeaderForm">.for that matter u can write this at any line after this statement
    once you do that select qucik par upload from the tool bar and deploy it.
    go to system administration-system configuration-support-support desk-administration console and upload the par file
    before following these steps take a backup of par file
    reward points if helpful

  • Display current date in jsp?

    I hate asking for code, but I can't find anything on this. I'm trying to display the current date in the format YYYYMMDD on a jsp page without using scriplets. I've seen getting the time in milliseconds used through
    <jsp:useBean id="now" class="java.util.GregorianCalendar" />
    <c:out value="${now.timeInMillis}" />but now.year/Year/YEAR etc all give me 500 errors. I've also tried
    <jsp:useBean id="now" class="java.util.Date" />
    <c:out value="${now.year}" />But this just yields a constant. I know there is the SimpleDateFormat which I think would go with the java.util.Date example, but I'm not sure how it would be used in this context. Can anyone help me to get the date?

    Or how about using the JSTL tag for it:
    <jsp:useBean id="now" class="java.util.Date" />
    <fmt:formatDate value="${now}"/>This tag leverages the java.text.SimpleDateFormat to do its job.
    Cheers,
    evnafets

  • Display current date and time in a Input text field.

    Hi,
    I am new in ADF trying to convert the Oracle Forms to ADF. I have questions how can I display the current date & time in the input text filed when ever the page opens .
    Thanks in advance.

    Hi,
    Check followings will useful
    current date setting
    Current Date

  • Displaying Current Date and Time in JSP

    Hi,
    I need to insert the current date time in Ms SQL Server Database using jsp page. The format of the code willbe
    insert into table(update_date) values ('2007-01-01 10:02:21');
    But i am not getting how to display the current date and time ie. 2007-01-01 10:02:21 using jsp.
    I have tried using
    SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    GregorianCalendar cal = new GregorianCalendar();
    String dd = sdf.format(cal.getTime());
    insert into table(update_date) values (dd);
    But it didnot get inserted data.
    Can anybody figure out with simple ideas.
    Thank You

    Why then are you trying to insert the current date on a table?
    To show the current date on the JSP you might try
    <%=new Date()%>Or the way you had it on your first post with the date formatter and then use the <%=%> tags. Anyway, it seems to me I'm not really understanding what you actually want to do :-p
    P.S. NOW() is a MySQL function too, not only MSSQL server (didn't even know it had it too ;-))
    mysql> insert into a(up) values (now());
    Query OK, 1 row affected (0.00 sec)
    mysql> select * from a;
    +------------+
    | up         |
    +------------+
    | 2007-04-09 |
    +------------+Message was edited by:
    benubach
    Message was edited by:
    benubach

  • How to set Default value of a parameter  to display Current Date

    I need to display the Default value for my parameter 'As of Date' which is of datatype Date as Current Date[DD-MON-YYYY].
    How can I do This??

    As Tamir-L pointed out, there is no direct way to do this, but there is a workaround:
    First, create a new parameter, but do not base it on any item. Give the parameter a default value of "Today".
    Then, create a condition like:
       (    :myParam = 'Today'
        AND <date_item> = sysdate)
    OR (    <date_item> = to_date(:myParam, 'DD-MON-YYYY'))Where :myParam is the parameter you created, and <date_item> is the item you are comparing against.
    To make things a bit more bulletproof, you could create a calculation that returns sysdate when the parameter is 'Today', a date when the to_date is successful, and NULL when the to_date fails, and use the calculation in the condition.

  • Datechooser display current date in YYYY/MM/DD format on init

    I have two date fields. I'd like one date chooser to display
    the current date on creation complete and the other should display
    the 30 days after the current date.
    The format needs to be YYYY/MM/DD.
    I'm currently getting a the current date in a var called
    currentDate but it returns at 11 Dec 2008.
    Thanks in advance.
    I

    Thanks,
    I am using : <mx:DateField id="effective_date"
    formatString="YYYY/MM/DD"
    text="{dgMessages.selectedItem.effective_date}" showToday="true"
    enabled="true"/>
    so after the user chooses a dates everything is fine.
    The customer wants todays date to already be populated in the
    datefield when the application loads and that's where I have my
    problem.
    I get my current date:
    var currentDate:Date = new Date();
    but I need to format that date from 12 Dec 2008 to 12/12/2008
    and create another date var called endDate adding 60 days.
    I assume I must convert this vars to strings since I get an
    error when attempting to display them in the datafield.
    I hope I explained that well enough.

  • Display current date and time

    Hello everyone,
    how can I display the current date and time in a simple text field?
    Best Mobilizer

    Hello,
    You can simply use
    now()
    You can also do more complex things with this.
    Text(Now(),"hh:mm:ss a/p")
    Check the following page for all the possible functions
    http://siena.blob.core.windows.net/beta/ProjectSienaBetaFunctionReference.html#_Toc373745510
    Regards
    StonyArc

  • Time field also displaying current date

    Hi there
    I have two databound fields (to a Sybase back-end) - one is a date field, the other a time field!
    The date field works fine, but the time field is displaying the current date as well as the data retrieved time!
    The field is set to:-
    Data pattern: HH:MM::SS
    Data Format: Time
    Type: Date/Time Field
    Validation Pattern: HH:MM:SS
    The field is defined as 'time' in Sybase, and displays just the time in other objects (.NET fields...).
    Anyone any ideas?

    not the cleanest code, but i had this laying around in an old
    project...
    date = new Date()
    month = date.getMonth() + 1
    today = date.getDate()
    fyear = date.getFullYear()
    hours = date.getHours()
    minutes = date.getMinutes()
    seconds = date.getSeconds()
    if(month <10){
    month = "0"+month
    if(today<10){
    today = "0"+today
    if(hours <10){
    hours = "0"+hours
    if(minutes <10){
    minutes = "0"+minutes
    if(seconds <10){
    seconds = "0"+seconds
    CurrentTime.text = month+"/"+today+"/"+fyear+"
    "+hours+":"+minutes+":"+seconds

  • Posting a full years worth but only display current date

    i am wondering how i go about posting my rss feed for the whole year but only allow itunes to read the current date? i understand from research that it takes the most current date and uses that as the first. but if i wanted to display September's 06 podcast in September and not July's 07 then how would i do that. i have seen some software that you can purchase that will do this for you, but i would rather code it my self or with the help of others. does anyone have any ideas on how this is done? or have you done it your self. any thoughts or ideas are very welcomed.

    not quite. i have cooking videos that i would like to be availbe new episode every 2 weeks. so my rss feed is set up with 27 diferent items, because 52/2=27 52 is the number of weeks. any who so there are 27 diferent items in the rss feed all with the diferent dates. (item 1= aug 30, item 2=sept sept 13, item 3= sept 27....) but on sept 13 the only items that should display would be the aug 30th and the sept 13th. but when sept 27th roles around all prev. are displayed includeing the new sept 27th episode.
    i understand that i can just reupload the rss feed and ping the system. but i am just trying to see if i can do this automated style for ease of use and to be able to concentrate on other things.
    thank you for your quick reply.

  • Displaying current date

    Hi Gurus,
    I have an AP requirment in which i have to display the current date in a column of the report and then i have to find the status of the document whether it is due or not yet due depending on the due date. How will u display the current date in the report? Is there any standard variable which can be used or should i write Exit. I also want to implement aging buckets for this report. Please suggest me how to move forward with this?
    Regards,
    Raghavendra.

    Hi Raghavendra,
    Where u want to display the current date in report ....do u want to display it as a label of the column --- If so then u can use the Text variable option.
    For the reporting requirement please provide the query structure to help u out better .  What wil be in the rows and in columns and what kind of logic is required for buckets.
    Thanks
    dipika

  • Need to display current date and time in arabic

    Hi,
    I'm very new to arabic and probable this is sumthing simple.
    I have to work on a flash arabic application.
    Through actionscript 2 I'm getting the current date and time.
    I want to display this in arabic. Please suggest me a solution.
    Thanks
    Sunira

    You would have to work out some font or something. I have no experience with Arabic

  • Displaying Answers Date Prompts in Title of Report

    I come from a BO background and we are now implementing OBIEE into our environment. My question revolves around the display of dashboard prompt values in the Answers report title.
    I have a Dashboard Prompt built that uses the expression 'DateColumn' between - user inputs their two values using the Calendar control.
    Is there anyway with this scenario to display what the user chooses in the Answers report title? In the Answers criteria I have set the criteria for the 'DateColumn' to be prompted.
    I see you can assign some of the Dashboard prompts to variables, however, you can't do it when you using the Between logic or the Greater than logic.
    I look forward to any input and thank you so much in advance!

    I presume you are aware of the filters view that shows you all the filters applied to the report, but you want the parameters in the title and no where else.
    The other option is not simple. You could make your Dashboard prompts as equalities, and then you could save the parameters to Presentation Variables and pass the parameters to a nested report inside a narrative iframe where you construct the real query. An excellent example of this is Venkatakrishnan's blog in the URL below:
    http://oraclebizint.wordpress.com/2008/02/19/oracle-bi-ee-101332-passing-operators-in-dashboard-prompts-go-url-and-presentation-variables/
    You may check out the section "Oracle BI Presentation Services Go URL to Issue SQL and Pass Filters" in the Presentation Services Administration Guide for more information.
    http://download.oracle.com/docs/cd/E10415_01/doc/bi.1013/b31766.pdf
    HTH,
    Nilanshu

  • Display current date

    i have emp table
    my requirement is whenever a new record is entered i want to display bydefault sysdate in HIREDATE column
    i'm using oracle forms 10g
    please help me

    my requirement is whenever a new record is entered i want to display bydefault sysdate in HIREDATE column go to HIREDATE column properties then set initial value *$$date$$* for user machine sysdate or use *$$dbdate$$* for server machine sysdate.
    If need sysdate with time then write *$$datetime$$* or *$$dbdatetime$$*
    if someone response is correct, please mark it accordingly.

Maybe you are looking for

  • LZW Patent expired 2 years ago.  Why no JAI Support?

    The Unisys patent on the LZW algorithm expired in 2003 and 2004. Why is there no support for it in JAI yet? http://www.unisys.com/about__unisys/lzw

  • How do I reinstall an OEM version of Adobe Acrobat Standard X

    I have an OEM card for Adobe Acrobat Standard X.  I cannot download the trial of this and then activate it becasue the download automatically goes to Acrobat Pro and then says the serial number I have is invalid.  I cannot go to the store because I d

  • Message 16389 Not found

    I get this error on OO4O 8.1.7.3.15 on each data control error. It seems not to find the error entries. The error OIP-16389 is not explained in the Help (ORACLEO.hlp). Can anyone help me ? The full message is : OIP-16389: Message not found; product=O

  • Update with case statement

    Hello, I want to use case in update statement. For example I have a table whose name is Item. There are 20 fields in this table. StockHoldType, Quantity and Amount are three of them. I want to update quantity or amount fields according to stockholdty

  • Rename column name

    Can i rename column name of a table. If so how to do it????