How to display the current time in a UIX page

Hi All,
another UIX question....
A requirement of a customer is to display to current data and time in every page.
It should be done in a <header>. So i'm writing a new (template based) renderer for that element. How can i display the current time and date on it?
Thanks in advance for any help...
Regards,
Robert Willems

Hi Robert -
When you say you are writing a template-based Renderer, do you mean that you are creating a custom look and feel and replacing the header Renderer? If so, I'd recommend instead simply creating your own template (not template-based Renderer), and reference your template directly from your uiXML pages where you want to insert the timestamp.
You'll probably want to write a method data provider which calls System.currentTime(), convert the result to a date, and then use Java's date formatting capabilities (see java.text.format.DateFormat) to produce a user presentable String that you can return from your data provider.
For more info (and samples) on templates and data binding, see the "Templates and Data Binding" section of the "Includes and Templating in ADF UIX" help topic:
http://tinyurl.com/5b7bf
Andy

Similar Messages

  • How to display the current day value in Numbers app?

    In Numbers 3.2.2, where the current date and time happens to be 17 Dec. 2014 11:46am:
    What formula will display the current date's numeral value?
    What formula will display the current month's short name as text?
    What formula will display the current year in four digits?
    What formula will display the current time in the style "11:46am"?
    Appreciated.

    I've taken the liberty of tweaking that handy script to format the date as requested by the OP:
    on run {}
      set right_now to (current date)
      set short_month to text 1 thru 3 of (month of right_now as string)
      set the_year to year of right_now as string
      set the_day to day of right_now as string
      set short_time to text 1 thru 5 of time string of right_now
      set the_secs to time of right_now
      if (the_secs / 2 as integer) < 21600 then
      set am_pm to "am"
      else
      set am_pm to "pm"
      end if
      set s to space
      set text_date to the_day & s & short_month & ". " & the_year & s & short_time & am_pm
      set the clipboard to text_date
      my paste_date()
    end run
    on paste_date()
      tell application "Numbers"
      activate
      tell application "System Events"
      keystroke "v" using {command down}
      end tell
      end tell
    end paste_date
    This considers 11:59:59 to be "am" and 12:00:00 to be "pm". (Edited after further consideration.) It has to be run either as an Automator service, or saved in ~/Library/Scripts/Applications/Numbers/ and run from Numbers' script menu. If run from Script Editor, it pastes the date into the end of the script itself.
    Hope it helps,
    H

  • How to display the current date in the prompt value.

    Hi,
    How to display the current date in the prompt value. When the user runs the query he want the current date to be displayed in the prompt value and he should also be able to change the date if required ...... I am using web Intellegency BO XI3.0.
    Thanks,
    Shakthi.

    Please refer the below link.
    Prompt  with  default  date   (  currentdate-1  and current date-8)
    http://www.dagira.com/2008/07/15/how-can-i-make-today-my-default-prompt-value/
    http://www.dagira.com/2008/07/21/using-a-magic-date-value-in-prompts/
    Regards,
    Bilahari

  • Please provide an example of how to display the system time in CNiNumEdit.

    I need to display elapsed time in a numeric edit control. The value must be a double. Using MFC, please show me an example that displays the system time in a CNiNumEdit control.

    The trick is to set the FormatString of the num edit control to a format that displays dates/times and to use the COleDateTime class to handle converting the date/time to a double. COleDateTime encapsulates time stored as a DATE, which is a typedef for double. COleDateTime uses the same conversion factor for date/time as what the num edit expects, and since it supports a conversion operator to a DATE, which is really a double, and the num edit Value property is a double, displaying the current time in a num edit can be as simple as this:
    // Assuming you have a member variable called m_numEdit for a CNiNumEdit
    m_numEdit.FormatString = _T("hh:nn:ss");
    m_numEdit.Value = COleDateTime::GetCurrentTime();
    Hope this helps.
    - Elton

  • How to display the current Date and time in xslt version 1

    i am using xslt version 1 .i want to display the current date and time in the output xml using xslt(Jdeveloper) ..i just added the namespace xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
         xmlns:ns1="urn:oracle:integration:b2b:7D30046DC68A4FA689956D8241FA3B99">
    and used thsi function <xsl:value-of select = "xp20:current-date()"/>
    but it does not works for me ..help needed????
    Edited by: user9519185 on Jan 20, 2009 3:04 AM

    Use a formula: =NOW()
    Format the cell for Date and Time, with both the Date part and the Time part displayed. Format the two parts as you wish, using the choices in the Inspector's menus.
    The cell will update each time the table is recalculated.
    (Description is for Numbers '09 (Mac), Numbers for iOS will be similar, but not necessarly identical in details.)
    Regards,
    Barry

  • How to put the current timer in the frame

    I am doing one application and i am using frame. I want to show the current time( hour and minute). But i don't know how to implement it. Please help me to solve my problem. Below is the sample code of my program. How to put the timer in the bottom part.
    //AdminMenu.java
    import java.io.*;
    import javax.swing.*;
    import java.awt.event.*;
    import java.awt.*;
    public class AdminMenu extends JFrame{
    private JLabel lblmenu;
    private JLabel lblvideo;
    private JLabel lbladmin;
    private JButton cmdaddvideo, cmddeletevideo, cmdeditvideo;
    private JButton cmdaddadmin, cmddeleteadmin, cmdchangepass;
    private Container c;
    private GridBagLayout gdlayout;
    private GridBagConstraints gdconstraints;
    private Color colorValues[] =
    { Color.black, Color.blue, Color.red, Color.green };
    public AdminMenu()
    super("Administration Menu");
    JMenu fileMenu = new JMenu( "File" );
    fileMenu.setMnemonic( 'F' );
    JMenu openMenu = new JMenu ("Open");
    openMenu.setMnemonic('O');
    fileMenu.add( openMenu );
    JMenuItem exitItem = new JMenuItem( "Exit" );
    exitItem.setMnemonic( 'x' );
    exitItem.addActionListener(
    new ActionListener() {
    public void actionPerformed( ActionEvent event )
    System.exit( 0 );
    } // end anonymous inner class
    ); // end call to addActionListener
    fileMenu.add( exitItem );
    // create menu bar and attach it to MenuTest window
    JMenuBar bar = new JMenuBar();
    setJMenuBar( bar );
    bar.add( fileMenu );
    setSize(300,250);
    setLocation(350,200);
    this.setResizable(true);
    show();
    //---------------------- Main -------------------------------
    public static void main(String args[])
    AdminMenu app = new AdminMenu();
    app.setDefaultCloseOperation(
         JFrame.EXIT_ON_CLOSE );
    Thanks for helping me

    e.g. use a thread that invokes new Date() (every minute), format the Date with SimpleDateFormat and print the result String on a Label that you can put on your frame ...

  • How to display the current date witout chane anyone

    Hi all
    I have some problem in date field.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    PARAMETERS :   S_INDATE TYPE SY-DATUM DEFAULT  SY-DATUM.
    SELECTION-SCREEN END OF BLOCK B1 .
    This the code of selection screens. Normally default it will display the current date. But in my program it can change the user… but I want to display the date and it cant be the change anybody.. How should I do it…??????????…
    Regards,
    nawa

    hi ,
    Chk this.
    SELECT-OPTIONS : s_kunnr for kna1-kunnr.
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
         if (SCREEN-NAME EQ 'S_KUNNR-HIGH') OR (SCREEN- NAME EQ 'S_KUNNR-LOW').
         SCREEN-input = 0.
         MODIFY SCREEN.
      ENDLOOP.
    Rgds
    Anver

  • How to display the current date in a CP5 project?

    What is the best way to display the current date into captivate?

    Hello,
    Use a Text Caption in which you insert the system variable cpInfoCurrentDate.
    Inserting a variable is possible with the X in the Format accordion of the Properties panel of the Text Caption:

  • How to display the current date in Flex app

    I need to display the current date in my Flex application.  Is there a simple way to do this and display it as a label or text field?  Also, can this be formatted to display the date as "Day of Week, Month Day, Year"?
    Thanks!

    You can use this code and this page to tweak the formatString property.
    http://livedocs.adobe.com/flex/3/langref/mx/formatters/DateFormatter.html#formatString
    If this post answers your question or helps, please mark it as such.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
      creationComplete="init();">
      <mx:Script>
        <![CDATA[
          [Bindable] private var date:String;
          private function init():void{
            date = new Date().toString();
            date = df.format(date);
        ]]>
      </mx:Script>
      <mx:DateFormatter id="df" formatString="EEEE, MMMM D, YYYY"/>
      <mx:Label text="{date}"/>
    </mx:Application>

  • How to display the current name when renaming Finder item

    Is there any way to get Automator to display the current name of a Finder item when renaming an item?
    I want my users to be able to copy and rename a folder template but I want to display the folder template's current name as a default in the renaming dialogue window, so the user follows the correct naming format.

    Since you've already hacked into it, if you've got developer tools installed, it is most likely in the nib file that is in the English project folder in the Resources.
    I don't know what further implications that will have on the app in general, though.
    If you are a little adept at applescript, you may want to create your own Applescript Studio app to do this instead of Automator. Also, take a look at Platypus to make a wrapper around you applescript instead of AS Studio.
    Message was edited by: Barney-15E

  • How to display the current value selected in DDLB of another screen

    hi Experts
    I need some info regarding the dropdownlist in BSP.
    I have two screens . One screen contains the table view which contains a set of records.Each record has two columns.
    Second screen contains 2 drop down list.
    When i select one record and then press the submit button in the first screen .Then i want that the selected value of the selected record will display in the DDLB of the second screen. And then i can again select the value from the drop down list.
    For example:
    1st screen:
    record 1.
    col 1     col 2
    record 2
    col 1     col 2
    2nd screen
    ddlb1...........
    ddlb2...........
    So when i select the record1, then the current value of col1 and col2 should visible on the ddlbs of second screen first time. Then i choose other value from the ddlbs.....
    My Question is how to do the following
    "when i select the record1, then the current value of col1 and col2 should visible on the ddlbs of second screen".
    please provide some suggestions...
    Thanks.

    Hi,
    You can use form with post method
    like
    <htmlb:form method = "post"
                      action = "page2.htm"
                      target = "coding" >
    <htmlb:dropdownListBox id             = "labelAlignment"
                                               selection      = "<%= me->labelAlignment %>"
                                               onClientSelect = "document.forms[0].submit();" >
                          <htmlb:listBoxItem key   = "LEFT"
                                             value = "LEFT" />
                          <htmlb:listBoxItem key   = "RIGHT"
                                             value = "RIGHT" />
                        </htmlb:dropdownListBox>
    So once you select col1 and col2 in your case its value is in page attribute say hold, this attributes needs to be defined in page2.htm also with auto checked. You can get the val selected in page1.htm
    If helpful rewards point.
    Regards,
    Albert

  • How to display elapsed/current time of a song in Actionscript.

    Hi I have a question on how I can make my code display a total time for a song from a media player I created with Actionscript 3.0, using XML to load the song track.
    This is my current function which I have done and I am unsure on what the problem is that is not allowing the elapsed time to display in a textfield on my stage.
    stage.addEventListener(Event.ENTER_FRAME, timeElapsed);
    function timeElapsed(e:Event):void
                        var minutesCurr:Number = Math.floor((my_channel.position /1000) /60);
                        var secondsCurr = Math.floor((my_channel.position /1000) % 60);
            if (secondsCurr < 10)
                secondsCurr = "0" + secondsCurr;
            var minutesTot:Number = Math.floor((my_sound.length /1000) /60);
            var secondsTot = Math.floor((my_sound.length /1000) % 60);
            if (secondsTot < 10)
                secondsTot = "0" + secondsTot;
            completeText_txt.text = minutesCurr + ":" + secondsCurr + "/" + minutesTot + ":" + secondsTot;
    I tried adding to the stage and I am getting a null object reference.
    Thanks Casey

    The 1009 error indicates that one of the objects being targeted by your code is out of scope.  This could mean that the object....
    - is declared but not instantiated
    - doesn't have an instance name (or the instance name is mispelled)
    - does not exist in the frame where that code is trying to talk to it
    - is animated into place but is not assigned instance names in every keyframe for it
    - is one of two or more consecutive keyframes of the same objects with no name assigned in the preceding frame(s).
    If you go into your Publish Settings Flash section and select the option to Permit debugging, your error message should have a line number following the frame number which will help you isolate which object is involved.

  • How to display the Date Time using the System Time zone

    Friends,
    Can anyone help me with below scenario..
    I have to display Date Time on a jsff page, This value associated to one of Transient View object populated from the database.. Is there any way I can handle on the screen to display the same date /time bassed on the system time zone ?
    I know one way how we can handle it.. while populating to View object we can set the time based on the system time zone.. but it would be easy and simple if there is any approach I can use on UI layer itself..
    thanks

    I don't understand why this display doesn't pay attention to the date/time format settings that are set in the language and text prefs.
    Those settings are used for date OR time, and provide for different displays depending on the space available. The menu bar does not have a fixed space available, and wants both date and time.
    In Leopard, it used the medium time format. To get the date and time, you could modify that format to include the date, but that could cause problems with software that happened to use the medium time format and expectede just the time. Also, you might want to change the medium time format without changing the menu bar display. For these reasons, Snow Leopard's menu bar clock uses its own formatting for data and time display.

  • How to display the Current Date on page using ADF Components

    Hi,
    Is there any way to display the system date on a page developed using ADF Components.
    I am thinking of writing the java code to display the date. Just wanted to check is there any pre-defined component of ADF that I can make use of.
    Could anyone tell me how to do this using ADF components?
    Thanks in advance.
    Sivaji....

    Please refer the below link.
    Prompt  with  default  date   (  currentdate-1  and current date-8)
    http://www.dagira.com/2008/07/15/how-can-i-make-today-my-default-prompt-value/
    http://www.dagira.com/2008/07/21/using-a-magic-date-value-in-prompts/
    Regards,
    Bilahari

  • How to display the elapsed time of a video (event video) in Captivate 6

    I have a Captivate 6 project which includes two separate videos and I am wondering how I can display an elapsed time for the videos - preferably one that stops if the individual stops the video.

    Hello and welcome to the forum,
    Are you talking about an inserted video, or about the Captivate file itself? I'm asking this because a lot of users refer to a published CP-file as a video.
    'Elapsed time': is this the real time spent by the user, or the time as you can see in the TOC (developer's time)? I blogged once about the difference.
    Lilybiri

Maybe you are looking for

  • Lost all my media in iTunes after moving them to a 2d hard drive!

    I recently installed a slave hard drive on my PC to free up space for the master drive. Since the stuff on my iTunes was taking up a lot of space, I moved it to the slave drive. However, when I open iTunes, everything has been completely cleared! The

  • Internals of Packager for iPhone

    Hello, just out of curiosity. Does anyone of you know what exactly does the "Packager for iPhone" does? At first, I thought that it was some kind of cross-compiler from swf bytecode to Obj-C/arm code; because of Apple Restrictions, and because of the

  • Spry Sliding Panels - Next Link

    I was hoping that someone might be able to give me a hand in modifying the sample code for the Spry SlidingPanels from a dataset. I'm able to display 4 panels but the "Next" link in the sample has been designed to show only on the even records rather

  • Add audio to slide show from Itunes?

    How do I add music from itunes to my slide show.  I am using pse 10.

  • How to get i books on ios 421 nowdays

    getting more upset by the click i have a 2nd gen i touch wich i use mostly for reading it stoped getting my photos and books because of the new ios i am this close of tossing this in steve jobs grave, its best that this have some sort of solution.