Display date and Time in Oracle Application Express Page

Hi
I have a requirement of showing the date and time in the top left corner of the page which should be updated at all times . The format is DD-MON-YYYY HH24:MI:SS.
I am able to display the date but not the time . Also the time should be updating on its own to the last second.
Another requirement is that on selecting a particular value from the drop down the table values displayed should be filtered
Thanks in advance for helping me out
you can also send in the responses to [email protected]
Regards
Jude Franco

Hello,
I am able to display the date but not the time Probably due to your NLS settings not displaying the time component for dates. However you can manually specify the output format like this -
jes@DBTEST> select to_char(sysdate, 'HH24:MI:SS DD-MON-YYYY') as TS from dual;
TS
10:47:45 10-DEC-2008
Another requirement is that on selecting a particular value from the drop down the table values displayed should be filtered Really need more details on that (remember assume that we know nothing about your requirements other than what you tell us). However at a high-level you need to include the drop down value in the query predicate used for your report, for example -
select
  e.ename,
  e.sal
from
  emp e
where
  e.deptno = NVL(:P1_DEPTNO, e.deptno)Would use the value from the P1_DEPTNO select list (presumably displaying department names) and use it to filter the result. The NVL is there so that if no dept is selected then the query by default shows all the records.
Hope this helps,
John.
Blog: http://jes.blogs.shellprompt.net
Work: http://www.apex-evangelists.com
Author of Pro Application Express: http://tinyurl.com/3gu7cd
REWARDS: Please remember to mark helpful or correct posts on the forum, not just for my answers but for everyone!

Similar Messages

  • I have checked the box "display date and time on the Menu Bar" and it does not work.  Using OS X Yosemite 10.10.2  Anybody have a fix?

    I have checked the box "display date and time on the Menu Bar" and it does not work.  Using OS X Yosemite 10.10.2  Anybody have a fix?

    Please read this whole message before doing anything.
    This procedure is a test, not a solution. Don’t be disappointed when you find that nothing has changed after you complete it.
    Step 1
    The purpose of this step is to determine whether the problem is localized to your user account.
    Enable guest logins* and log in as Guest. Don't use the Safari-only “Guest User” login created by “Find My Mac.”
    While logged in as Guest, you won’t have access to any of your documents or settings. Applications will behave as if you were running them for the first time. Don’t be alarmed by this behavior; it’s normal. If you need any passwords or other personal data in order to complete the test, memorize, print, or write them down before you begin.
    Test while logged in as Guest. Same problem?
    After testing, log out of the guest account and, in your own account, disable it if you wish. Any files you created in the guest account will be deleted automatically when you log out of it.
    *Note: If you’ve activated “Find My Mac” or FileVault, then you can’t enable the Guest account. The “Guest User” login created by “Find My Mac” is not the same. Create a new account in which to test, and delete it, including its home folder, after testing.
    Step 2
    The purpose of this step is to determine whether the problem is caused by third-party system modifications that load automatically at startup or login, by a peripheral device, by a font conflict, or by corruption of the file system or of certain system caches.
    Please take this step regardless of the results of Step 1.
    Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards, if applicable. Start up in safe mode and log in to the account with the problem. You must hold down the shift key twice: once when you turn on the computer, and again when you log in.
    Note: If FileVault is enabled in OS X 10.9 or earlier, or if a firmware password is set, or if the startup volume is a software RAID, you can’t do this. Ask for further instructions.
    Safe mode is much slower to start up and run than normal, with limited graphics performance, and some things won’t work at all, including sound output and Wi-Fi on certain models. The next normal startup may also be somewhat slow.
    The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.
    Test while in safe mode. Same problem?
    After testing, restart as usual (not in safe mode) and verify that you still have the problem. Post the results of Steps 1 and 2.

  • Can we display date and time in a movie

    I am filming a production process and would love to be able to display time of day as the video is playing.
    I can see this info while editing, but I don't know if iMovie'11 will let me display this info onto the movie itself? I need to pass these clips to someone who doesn't have any editing tools, but they will be interested to review the events on the tape relative to the time of day that they occurred.
    It would be cool if iMovie had a title effect that 1) displays time and date info, 2) let's the user edit the format of the displayed date and time, and finally, 3) lets the user move this title information to a location in the tape that won't obstruct the critical elements of the movie.

    Thanks Appleman 1958!
    This helps, but to your point, it doesn't show seconds, and it doesn't show frames (for the video purists out there).
    Limited to no more detail than minute data, it is not too useful for me, but I could see this being fun in a fast motion shot.
    Also nice for capturing day and time of day information for a vacation video.
    For my application, all activity took place in 5 hours, and I would need to see down to the second (and ideally the frame) when specific actions took place.
    It would be awesome if Apple would let us
    1) edit displayed information (lets say for example turn off date, but show hours minutes seconds and frames)
    2) edit the font & font size
    3) allow flexible placement of the information window. The default location may be where major action is.
    Again, thanks for pointing out this title!

  • Problem with getting current date and time using oracle.jbo.domain.Date

    I`d like to get current date and time using oracle.jbo.domain.Date method getCurrentDate(), but it always return current date and 12:00:00. I also need to get the current time.

    I think you should use java.sql.Timestamp domain.
    (And set database type to TIME or DATETIME.)
    Jan

  • Displaying Date and Time in portal desktop

    Hi
    I have been looking around for any info or guideline to display the <b>date and time</b> in the portal desktop. I could not find anything very helpfull. In visual admin you can swap lastname and firtsname and vice versa. Thou there is nothing about displaying date and time.
    Is it possible to display it and how?
    Thank you for any information
    Namira

    Where u need the time to be displayed.. If it has to be displayed in Masterhead you can programatically display it...
    import the par file for Masterhead, change it and replace it..
    Its a simple JSP page so that u can change it easliy..
    cheers
    gEorgE

  • How to display date and time on jsf page

    Hi,
    how to display date and time on jsf page
    we are using 11.2.0.0 jdeveloper on windows.
    thanks
    Edited by: user12187801 on 26-Jul-2012 01:42

    Your question is certainly lacking some information.
    If you want a constantly updating date/time - then JavaScript is your best bet, and Google would find you examples like [url http://www.webestools.com/scripts_tutorials-code-source-7-display-date-and-time-in-javascript-real-time-clock-javascript-date-time.html]this
    If you meant something else, then it's back to you to explain.

  • Insert current date and time into Oracle date type field

    I have a JDBC current date and time insert into Oracle 9i that almost works. It submits the current date and a fixed time into the Oracle date type field. I am using Tomcat 6.0.20.
    For example if I insert the data at 7:24:04 PM on Feb 16, 2010 it will insert as: 16-Feb-2010 12:00:00 AM
    The date part works but the time always shows 12:00:00 AM no matter what date or time the data is inserted.
    Here is what I have for my JDBC inserts and I also tried something with DateFormat:
    PreparedStatement ps; Date mydate = new Date(new java.util.Date().getTime()); //insert statement here.... stmt.setDate(1,mydate);
    I also tried:
    PreparedStatement ps; java.sql.Timestamp mydate = new java.sql.Timestamp(new java.util.Date().getTime()); SimpleDateFormat fmt = new SimpleDateFormat(.... //insert statement here.... ps.setTimestamp(1,fmt.format(mydate));
    Both keep submitting the date into Oracle as 16-Feb-2010 12:00:00 AM
    Anyway to get the current date and time? For example if I insert the data at 7:24.04 pm today it should show as 16-Feb-2010 07:24.04 PM in Oracle.

    sportsMarkr wrote:
    Date mydate = new Date(new java.util.Date().getTime());Please see the javadocs for java.sql.Date and note the part that says "...to zero"
    [http://java.sun.com/javase/6/docs/api/java/sql/Date.html]
    If you want a date and time then use java.sql.Timestamp.

  • Geting and setting date and time in oracle using jdbc

    can u send me a sample snippet which shows me how to set date and time to a column in oracle database where the column datatype is date.
    and also send me the sample code to get the date and time from the above said column
    thanks in advance

    If you want DATE with time normalized to midnight, use java.sql.Date. If you really want time, with hours/minutes/seconds/millis, use java.sql.Timestamp.
    As for the best way to interact with the database, use java.sql.PreparedStatement and its get/setDate and get/setTimestamp methods. Those will escape dates for you properly.
    Look for a JDBC tutorial on-line to see how to do this, or http://www.javaalmanac.com for the java.sql package examples.
    %

  • Automatically displaying date and time in a date/time field on form initialize

    Good day all;
    I am trying to have the current date and time automatically be generated in a “date/time” field when the form is opened.
    I went through the forum and found an entry from Srini “ xfa.host.messageBox("" + Date());” . Of course this brought up a system message box with the date and time.
    I then tried “DateTimeField1.rawValue = (“”+date())… This also gave me a system message box with the date and time…
    Please let me know where I am going wrong
    Chomp

    Found the answer... And yes... in was in the "help" section... What can I say I was making it a lot more crazy than I needed to.
    You can use a date/time field to automatically show the current date by using the Runtime Property option in the Value tab of the Object palette.
    When using a current date field, the date updates to reflect the system’s current date each time a user opens the form.
    1.
    In the Library palette, click the Standard category and drag a Date/Time Field object onto the form design.
    2.
    In the Object palette, click the Value tab and select Calculated - Read Only from the Type list.
    3.
    Select the Runtime Property option.
    4.
    View the form in the Preview PDF tab.

  • Backing up all data and objects of Oracle 10g Express Edition...

    Hi,
    I have tables, packages, views, procedures, etc. in Oracle 10g Express Edition, running on Windows XP. I would like to create a backup of the complete database (objects, relationships, all data, etc) into a file that I can restore in case the database crashes.
    What do I do?
    Thanks.

    markk2 wrote:
    I am actually using it for Production. Yes, I would need objects and data.I would suggest to look at the Standard Edition as well if you are using it for production.
    Is there a way to backup everything without data and then backup everything with data? Also, is there a way to restore everything without data and then restore everything with data?What's the meaning of "backup everything withiut data" and "then backup everything with data" ? The data is in the tables alone. The rest of the objects are not containing data but are using it, be it views, procedures etc. There is no such restore like without data. Without data, all what you would be getting would be structures of the tables which is going to be of no use. The export/import tool, is a simple tool which can put the tables (and other objects as well) along with their data in your dumpfile . In the situation of loss of a table, you can do an import from that dump file and you can restore the table back(with or without data, depends on the choice of yours while running Import command) . But this is just going to be a logical recovery of the object(s). For a complete database, it's better to use RMAN which would copy the datafiles and keep it with itself. Later, when you have a crash, you can restore those files to get teh database recovered. But if you want complete security, its better to put your db in the archive log and then do the backup along with the archive log files.
    HTH
    Aman....
    How to do this exactly? Thanks!

  • Displaying date and time in filename,

    hai to all,
    i need to take exp dump daily so i prefare to use scheduletask manager but i dont knew how to place the exp dump file name and its logs with their current sysdate and time while exp is taking part.
    for example:
    exp userid=........... file=d:/new_%date%.dmp log=d:/newlog_%date%.log .................................................
    then export gets completed but the dumpfile shows the file name as new_tue.dmp.
    it shows only the day but i need full date with its time.
    so can anyone help me ,thanks in advance.
    regards
    ashik

    Hope this may be useful.
    make the relvent modification to the below content and save it as .bat file and execute
    @echo off
    set ORACLE_SID=<your DB SID>
    date /T > abc.txt
    for /F "tokens=2,3* delims= " %%x in (abc.txt) do echo %%x > abc.txt
    for /F "tokens=1* delims=/" %%x in (abc.txt) do set DD=%%x
    for /F "tokens=2* delims=/" %%x in (abc.txt) do set MM=%%x
    for /F "tokens=3* delims=/" %%x in (abc.txt) do set YY=%%x
    for /F "tokens=1* delims= " %%x in ("%YY%") do set ZZ=%%x
    del abc.txt
    echo FILE=c:\%DD%-%MM%-%ZZ%.dmp>exp.txt
    exp <username>/<password> parfile=c:\exp.txt
    # just moving the .smp file to another dir.
    move %DD%-%MM%-%ZZ%.dmp c:\product\
    ~
    Gidhin KJ
    .

  • How to display date and time on page

    I have the effective date in the database correctly and it shows the date and timestamp of the transacation but only shows the date on the page.  How do I get it to show the date and timestamp on the page.

    Hello,
    If you are talking about a field on a PS page,  I had to do something somewhat similar to what you want and what I ended up doing was adding a datetime field (DATETIME1) on the page and on the page peoplecode (activate) I added this following code:   Record.DATETIME1.Value = %Datetime;
    The Result: 03/25/2015  1:01:54PM 
    Hope that helps.

  • Problem with Inserting Date and Time in Oracle 8i

    I am using JDBC thin driver version 8.1.6. with oracle 8i and am unable to insert and update date & time in American format
    (mm/dd/yyyy hh24:mi:ss).
    example:
    UPDATE TABLE_NAME SET DATE_COLUMN='08/16/2000 12:45:00';
    Can someone please help?
    null

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Kanwal:
    I am using JDBC thin driver version 8.1.6. with oracle 8i and am unable to insert and update date & time in American format
    (mm/dd/yyyy hh24:mi:ss).
    example:
    UPDATE TABLE_NAME SET DATE_COLUMN='08/16/2000 12:45:00';
    Can someone please help?
    <HR></BLOCKQUOTE>
    Hey Kanwal,
    You can try the following statement
    UPDATE TABLE_NAME SET DATE_COLUMN = to_date('08/16/2000 12:45:00','mm/dd/yyyy HH:MI:SS'
    WHERE .... ;
    null

  • Error in Displaying date and Time in Message - Nok...

    Hi,
    I have brought a new Nokia 5130 Xpressmusic last month. Now i am facing a problem when i received the message. In the message detail of any message of my inbox the time displayed is 7 to 8 hrs ago the time when i received the message.
    For Example
    If some body send me a message at 1:00 PM the message detail will show the time 9:00 AM approx....
    Any body help me on this....
    ~Ujjwal 

    make sure that your time and date settings are correct 
    for time make sure you have correct time zone - use local or your specific time zone if you prefer
    also see if you have automatic time update on or off, if it is on turn it off or if you are using local time you can have it on. see if this helps your issue any 
    You know what I love about you the most, the fact that you are not me ! In love with technology and all that it can offer. Join me in discovery....

  • How can display date and time in text item ?

    Hello all,
    I have placed two text items (named text_item1,text_item2).
    I want to place the current date in one text item and place current time in another text item. how can i place this?

    Hi
    This depends on ur needs
    WHEN-NEW-FORM-INSTANCE > if u want to appear it on the very begining moment
    --=============
    u can use
    WHEN-VALIDATE-ITEM > on ur date fields
    Here is a link that may help u decide where to take off with this code...
    http://www.dotnetspider.com/resources/22433-Triggers.aspx
    http://www.slideshare.net/magupta26/oracle-forms-tutorial
    Hope this helps ,
    Regards,
    Abdetu...

Maybe you are looking for