Strange date problem - 10g forms

Hi,
I execute this procedure from PL/SQL in database, I get both date and time.
SET SERVEROUTPUT ON
DECLARE
   p_qry      VARCHAR2(400);
   p_limit    NUMBER;
   retval     BOOLEAN := FALSE;
   p_min_date VARCHAR2(40);
   p_max_date VARCHAR2(40);
BEGIN
   p_qry := 'select /*+ INDEX(RAW_LOG RAW_LOG_IND */ timestamp from raw_log where ne_id=23';
   p_limit := 100;
   retval := Cp_Misc.Get_Time_Stamp(p_qry,p_limit,p_min_date,p_max_date);
   dbms_output.put_line('p_min_date=>'||p_min_date);
   dbms_output.put_line('p_max_date=>'||p_max_date);
END;
SQL> start vqry.sql
p_min_date=>07-09-25 15:33:03
p_max_date=>07-09-26 14:02:53
PL/SQL procedure successfully completed.If I execute the above same procedure from a form. I get only the date in the following format:
DD-MON-YY
Example:
25-SEP-07
Hours, Minutes & Seconds are null.
I am using 10 forms. In 6i forms, the same procedure returns HH24 ,MM,SS
Any ideas?. Is this a bug?
Thanks

You need to look at the code inside your function Cp_Misc.Get_Time_Stamp.
In that function, there is a To_Char conversion of the date that is using your session's default nls_date_format, which is a very bad thing to do. Every To_Char on a date should ALWAYS specify the output format required.
In fact, that function may not even have a To_Char function, but instead, it may have a place where the date is moved to a varchar2 variable, and PL/SQL does an implicit To_Char conversion.
In SQL Plus, issue this statement:
alter session set nls_date_format='dd-mon-yy';and then run your test.
Or in your form, issue this before you try your test:
Forms_DDL('alter session set nls_date_format=''yy-mm-dd hh24:mi:ss''');Then fix that function, so it is not dependent on the nls_date_format.

Similar Messages

  • Strange Date problem in Web Dynpro

    Hi
    I'm facing a strange problem. I have an input field and have associated it to an attribute of type 'date'. when I click on the date picker ane choose the date, say, for example, if I choose 12/29/2005, it is correctly displayed as <b>12/29/2005</b> in the input field.
    But when I print the value using wdcontext.currentcontextelement().getDate();,
    the date is displayed as <b>12/28/2005.</b>
    What could be wrong?? Please help.
    Jack

    Hi Jack,
    the problem is, may you are spliting the date and then displaying.
    Because if you display
    wdContext.currentContextElement().getDate();
    It returns a date in format yyyy-mm-dd (java.sql.Date format) then you need to format the date to make it display as per your format.
    Now if you see the function getMonth() for java.sql.Date, it returns month-1 for the month (i.e. 0 for jan 1 for feb etc.).
    Also it returns year=current year -1900, so for 2006 you will find value getYear()=106.
    Check the values accordingly and then format the date for display.
    Hope that will work for you.
    Ashutosh

  • Problem with JFMERGE using the last set of data on all form sets

    b Here is the scenario...
    I have a file of data in character delimited format. Each record needs to produce the same set of forms. I used the Visual Transformation Editor to define the field nominated data file, including the ^form statements. The transformation agent processes the file of multiple records just fine. I get a file from JFTRANS that contains the set of data & form statements repeated for each record in the file.
    Great so far.
    b Here is the problem...
    Unfortunately, the print agent is repeating the same set of data on every copy of the set of forms that is printed. It uses the data from the last set of forms to be printed.
    b Additional information...
    For ease of building the field nominated file by our custom client program we have standardized on using GLOBAL fields. Therefore, our DAT files contain all the ^global declarations with all the necessary ^form statements at the end. I used the transformation editor to build the same type of file. Therefore the file going to the print agent looks like:
    ^global name1
    data1
    ^global name2
    data2
    ^form form1
    ^form form2
    ^global name1
    newdata1
    ^global name2
    newdata2
    ^form form1
    ^form form2
    The printed result puts "newdata1" & "newdata2" on both sets of form2. Strangely, the correct data values are showing up on both sets of form1.
    The only difference between the two forms is that form1 is not defined with the fields as global where form2 does define them as global. I removed the global flag from form2 but that didn't change anything.
    I think I know what is occurring. JFMERGE is putting the data elements into the global dictionary and when the same name is in the file the latest data value ends up in the dictionary (thus all the forms print using the last data put into the dictionary). I certainly didn't expect this. I thought it would load the dictionary and print the first set of forms, then reload the dictionary and print the next set of forms. At least that is the way I see it occuring based on the order of things in the DAT file. Based on what is occuring it appears that JFMERGE reads the whole DAT file, building the dictionaries and then processes all the ^form statements.
    b My request for help...
    Does anyone know what I can do (such as insert some command) to get the correct data on the forms?
    It looks like using a fixed record format might do the trick but that isn't an option at this time. As things are right now it looks like I'm going to have to take the data file apart, and make lots of files with one line of data per file.
    I have a time deadline to get this printed so if there isn't a way to make JFMERGE operate as I expected it looks like I'll be doing this by hand. Fortunately, there are only 250-300 data lines. Future jobs could have thousands of data lines so if there isn't a way to do it with a multi-line data file I'll have someone create a program for splitting the original file up (and adding the ^job line).

    We don't use subforms so some of what you suggest isn't effective for us. Our forms are a duplication of the paper forms and are not dynamic. We design each form separately and our custom filler software (that builds the DAT file) uses a database with the required forms for each print job defined within it.<br /><br />Since we don't have subforms, our simple method of printing is to declare as GLOBAL all the unique fields used on all the forms to be printed followed by the ^form commands. It was a simple & straightforward method for us to do better than 500 print jobs over that past couple of years. In addition, our custom filler software can easily build the DAT files.<br /><br />Because I need to manually declare all the ^form statements my experience with using ^field is that the form must be declared followed by the appropriate field commands (repeat for all the forms).<br /><br />i <many hours later I continue typing this post><br /><br />Taking the original Transformation Definition File and customizing it for how things need to be when using ^field commands was a time consuming experience (and a learning one). It did the job as I needed but it is an experience I don't want to repeat. There has got to be a better way of building the TDF properly. I'm definately leaning towards a program to split the file into multiple files.<br /><br />Here is what I went through...<br /><br />I did all the editting using Notepad. I changed all ^global to ^field. Then I had to remove the #comment lines. Next was to find any references to fields that had to be global to the top and chang ^field to ^global. Then it was moving the fields around so they were underneath the appropriate ^form statement. Then, since one of the forms was multi-page I had to add the ^page command and sort the fields so they were under the correct page. That was followed by duplicating fields that are used on multiple forms or multiple pages. Then I discovered that the print agent won't do ^page unless "inline processing" is turned off (I did not want to specify the page name as it could change over time) - so I added "^inline off" in front of every ^page. Finally it was removing unecessary field references so the log file would be clean.<br /><br />For those that are interested, the following is an example of my final file. <br /><br />^global nameA<br />data<br />^global nameB<br />data<br />^form nameX<br />^field name1<br />data<br />^field name2<br />data<br />^form nameY<br />^field name1<br />data<br />^field name3<br />data<br />^inline off<br />^page<br />^field name4<br />data<br />^field name1<br />^inline off<br />^page<br />^field name5<br />data<br />^field name6<br />data

  • Icon problem in forms 10g

    hii
    I have oracle 10g forms installed on my pc, I want to display some icons on the button.i have done all of the required things like:I have kept all the gif icons in the particular place,& have changed the formsweb.cfg file by changing imagebase parameter to codebase,& I have changed the same path in the registry.dat file,as well as I have set the iconic property too,,,
    Now the main problem is that I am unable to see all these icons at the run time,at the design time icons are viewable,,wat changes should I do now???
    Plz help
    mohan kumar........

    hi,
    below is my complete registry.dat text.---------
    # This is the Registry file.
    # This file contains the logical [Java] Class name and an associated
    # [numerical] identifier that will be used to refer to objects of the
    # class in order to reduce the amount of information that needs to be
    # repeatedly transmitted to the client.
    # This file is of the Form understood by java.util.Properties (for now)
    # The System Level sound file is relative to the CODEBASE
    oracle.classById.1=oracle.forms.engine.Runform
    oracle.classById.4=oracle.forms.handler.FormWindow
    oracle.classById.5=oracle.forms.handler.AlertDialog
    oracle.classById.6=oracle.forms.handler.DisplayList
    oracle.classById.7=oracle.forms.handler.LogonDialog
    oracle.classById.8=oracle.forms.handler.DisplayErrorDialog
    oracle.classById.9=oracle.forms.handler.ListValuesDialog
    oracle.classById.10=oracle.forms.handler.EditorDialog
    oracle.classById.11=oracle.forms.handler.HelpDialog
    oracle.classById.12=oracle.forms.handler.FormStatusBar
    oracle.classById.13=oracle.forms.handler.MenuInfo
    # oracle.classById.14=UNUSED
    oracle.classById.15=oracle.forms.handler.ApplicationTimer
    oracle.classById.16=oracle.forms.handler.MenuParametersDialog
    oracle.classById.17=oracle.forms.handler.PromptListItem
    oracle.classById.18=oracle.forms.handler.CancelQueryDialog
    oracle.classById.257=oracle.forms.handler.TextFieldItem
    oracle.classById.258=oracle.forms.handler.TextAreaItem
    oracle.classById.259=oracle.forms.handler.FormCanvas
    oracle.classById.261=oracle.forms.handler.ButtonItem
    oracle.classById.262=oracle.forms.handler.CheckboxItem
    oracle.classById.263=oracle.forms.handler.PopListItem
    oracle.classById.264=oracle.forms.handler.TListItem
    oracle.classById.265=oracle.forms.handler.CfmVBX
    oracle.classById.266=oracle.forms.handler.CfmOLE
    oracle.classById.267=oracle.forms.handler.RadioButtonItem
    oracle.classById.268=oracle.forms.handler.ImageItem
    oracle.classById.269=oracle.forms.handler.IconicButtonItem
    oracle.classById.270=oracle.forms.handler.BlockScroller
    oracle.classById.271=oracle.forms.handler.JavaContainer
    oracle.classById.272=oracle.forms.handler.TabControl
    oracle.classById.273=oracle.forms.handler.ComboBoxItem
    oracle.classById.274=oracle.forms.handler.TreeItem
    oracle.classById.281=oracle.forms.handler.PopupHelpItem
    # Defaults for the Font details, all names are Java Font names. Each of
    # these parameters represents the default property to use when none is
    # specified.
    # defaultFontname represents the default Java fontName.
    # defaultSize represents the default fontSize. Note that the size is
    # multiplied by 100 (e.g. a 10pt font has a size of 1000).
    # defaultStyle represents the default fontStyle, PLAIN or ITALIC.
    # defaultWeight represents the default fontWeight, PLAIN or BOLD.
    default.fontMap.defaultFontname=Dialog
    default.fontMap.defaultSize=900
    default.fontMap.defaultStyle=PLAIN
    default.fontMap.defaultWeight=PLAIN
    # Default Font Face mapping.
    # appFontname represents a comma delimited list of Application Font Names.
    # javaFontname represents a comma delimited list of Java Font Names.
    # The number of entries in the appFontname list should match the number in
    # the javaFontname list. The elements of the list are comma separated and
    # all characters are taken literally, leading and trailing spaces are
    # stripped from Face names.
    # Note that this file uses the Java 1.1 Font names in order to be able to
    # handle the NLS Plane (BUG #431051)
    default.fontMap.appFontnames=Courier New,Courier,courier,System,Terminal,Fixed,Fixedsys,Times,Times New Roman,MS Sans Serif,Arial
    default.fontMap.javaFontnames=MonoSpaced,MonoSpaced,MonoSpaced,Dialog,MonoSpaced,Dialog,Dialog,Serif,Serif,Dialog,SansSerif
    # The Application Level icon files are relative to the DOCUMENTBASE
    # example: icons/
    # or an absolute URL.
    # example: http://www.forms.net/~luser/d2k_project/
    default.icons.iconpath=oracle\forms\icn
    default.icons.iconextension=gif
    # Application level settings to control UI features
    app.ui.lovButtons=false
    app.ui.requiredFieldVA=false
    # The background color is specified as an RGB triple.
    app.ui.requiredFieldVABGColor=255,0,0

  • Timestamp problem in Forms 10g

    In a 10g form (using 10g database, running on MS-W2000, Linux-Redhat)
    Record 1 is entered and saved at 12-JAN-2006 13:20:49.
    Record 2 is entered and saved at 12-JAN-2006 13:21:25.
    Then, these 2 records have the timestamp reversed upon retrieval:
    Record 2 12-JAN-2006 13:20:49.
    Record 1 12-JAN-2006 13:21:25.
    How can this happen? Any idea or suggestions? Please help.

    The date item property was defined as:
    data type: datetime
    maxium length:17
    initial value: $$DATETIME$$
    format mask: DD-MON-YYYY HH24:MI
    changed to ->
    data type: datetime
    maxium length:30
    initial value: $$DATETIME$$
    format mask: DD-MON-YYYY HH24:MI:SS
    It still does the timestamp switching for the record 1 and 2. If the record 1 and 2 are inserted more than a minute apart, then it works. Anything to do with database datetime setup?

  • Compilation problem in Forms 10g

    Currently we are upgrading from 6i to 10g forms
    we have 2 forms which we will complie partially in 10g and the form gets closed as a corrupted file.
    The same form when complied in 6i works fine.
    What can be the possible problem.
    Please help
    Thanks
    Yaaminy
    480-262-7881

    hi
    create a batch file of the following commands and compile them i hope it helps u.
    @ECHO OFF
    cls
    Echo compiling libraries 10g ....
    for %%f IN (*.pll) do frmcmp userid=User_name/pass@orcl module=%%f batch=yes module_type=library compile_all=yes window_state=minimize
    ECHO libraries compilation complete
    ECHO ----------------------------------
    Echo compiling menus 10g ....
    for %%f IN (*.mmb) do frmcmp userid=User_name/pass@orcl module=%%f batch=yes module_type=menu compile_all=yes window_state=minimize
    ECHO menus compilation complete
    ECHO ----------------------------------
    Echo compiling forms 10g ....
    for %%f IN (*.fmb) do frmcmp userid=User_name/pass@orcl module=%%f batch=yes module_type=form compile_all=yes window_state=minimize
    ECHO form compilation complete
    ECHO ----------------------------------
    ECHO Form Compilation completesarah

  • Problem printing date on the form

    Hello friends ,
    I am doing form for the HR . Is there any special formatting needed to print the date on the form . I am doing this .
    &t_payment-paydate& in the main window of the form .
    t_payment is the table and paydate the date of payment . But instead of printing 1/22/2006 . It is printing 3//20/07/2 some junk value . Is it the format related problem ?
    Any suggestions . You help would be greatly appreciated .
    Regards & Thanks ,
    Hari

    HI,
    You can do like this.
    You make the following changes in the program
    1. Define a character type field
         data: v_payment_date(10) type c.
    2.  Assign the date value to the character field
          write t_payment-paydate to v_payment_date.
    You make the following changes in your sapscript text element.
        instead of using field t_payment-paydate use v_payment_date.
    Thanks
    Ramakrishna

  • Problem with do click on a field - Oracle 10g form - UNIX

    Hello, friends.
    I nedd a help. I have a problem with a Oracle 10g form when it was executed in UNIX environment.
    The problem is that when I do click with the mouse in a different field, doesn't lead me to the other field. That is, don't let me to do click on a different field than the initial field of the form. Just work with TAB or ENTER.
    Would you tell me what I can check?
    Thanks.
    Kisses.
    Annie

    Hello
    Another question about the problem that I posted yesterday:
    Why the system.cursor_item isn't change when I do click in other field? Just the system.mouse_item changes. This problem occurss in Oracle 10g at UNIX environment (don't occurss in Windows environment).
    Thanks.
    Kisses.
    Annie

  • Problems in using using a calendar to pick up a date in portal form

    Hello:
    I met some problems in using using a calendar to pick up a date in portal form.
    I created a form using "custom layout"
    Using Scott/Tiger, emp table HIREDATE put the following anchor next to it in the body text field
    <<img src="/images/calendar.gif" width=24 height=22 border=0>
    Then, I put the source tag in the header section
    <script language="JavaScript1.1" src="/images/date-picker.js"></script> in the Header Text of the Form Text part.
    However, for some reasons, after I pciked the date in the calendar,the field in the form could not be updated.
    Your help would be highly appreciated.
    Wei

    I just fixed the bug. The data pickup calendar is working now.
    The reason is that:
    when oracle portal generates a portal form based on a table, the element in the generated form is defined by: [Form Name].[element name].[index#].
    e.g.
    <INPUT TYPE="BUTTON" NAME="FORM_AREA.DEFAULT.QUERY_TOP.01" VALUE="Query" onClick=" do_event(this.form,this.name,1,'ON_CLICK','');">
    The "FORM_AREA.DEFAULT.QUERY_TOP.01" means: A input text box "QUERY_TOP" with index "01" in the form "FORM_AREA" which is located in the "DEFAULT" block.
    The problem of my previous codes is that: Javascript could not access the elements on the parent widnow by name for those elements whose names have more than 1 "." sign e.g. "FORM_AREA.DEFAULT.QUERY_TOP.01". So, I accessed them by their locations in the DOM hierarchy. It works now.
    e.g.
    <a href="javascript:show_calendar('forms[0.elements[23');" onmouseover="window.status='Click to open an Wei's calendar'; return true;" onmouseout="window.status='';return true;">
    <img src="/images/calendar.gif" width=24 height=22 border=0>
    </a>
    Wei Ye

  • I have a strange 3g data problem.

    I have a strange 3g data problem.  At home I have zero 3G connectivity even though all bars are showing and says "3G" and wifi is "Off" ... unless I am on the phone and then magically the 3G data connection works perfectly!!  Does anyone have any idea what is happening?  Also when I bring my phone to my dad's or my friends house the problem disappears!! Is this a hardware or a AT&T network problem? os is 4.3.3
    Also called ATT and they said there was no problem with the network and that it was a hardware issue.  Also restored the phone several times but the problem did not go away.

    OK, no trouble shooting. The first thing I'd attempt is restarting in Safe Mode. If you still don't have luck try doing both a SMC and PRAM reset, it wouldn't hurt to do the SMC reset a couple of times. If still no luck let us know.
    SMC RESET
    Shut down the computer.
    Unplug the computer's power cord and all peripherals.
    Press and hold the power button for 5 seconds.
    Release the power button.
    Attach the computers power cable.
    Press the power button to turn on the computer.
    PRAM RESET
    Shut down the computer.
    Locate the following keys on the keyboard: Command, Option, P, and R. You will need to hold these keys down simultaneously in step 4.
    Turn on the computer.
    Press and hold the Command-Option-P-R keys. You must press this key combination before the gray screen appears.
    Hold the keys down until the computer restarts and you hear the startup sound for the second time.
    Release the keys.

  • Strange runtime result on forms 10g

    Hi,
    I am using forms 10G. Db is 10G.
    When I run the simple Scott’s emp table
    It runs on internet explorer and instead of giving emp table information it shown something like that:
    <html> <head> ORACLE FORMS.</head>
    <body onload="document.pform.submit();" >
    <form name="pform" action="http://lalo:8889/forms90/f90servlet" method="POST">
    <input type="hidden" name="form" value="I:\test\emp.fmx">
    <input type="hidden" name="userid" value="SCOTT/TIGER@orcl">
    <input type="hidden" name="obr" value="yes">
    <input type="hidden" name="array" value="YES">
    </form> </body></html>
    what is this?
    How should we get the forms simple screen on runtime?
    Where should we get entry so on it runs independently?
    Though is running well on 6i.
    Juma

    This is a duplicate of strange runtime result on forms 10g
    See my response to your original thread.

  • Problem submitting form data to FTP server

    Hi
    Sorry for the newbie question, and sorry if this has been covered elsewhere--I wasn't sure what to search for!
    I've created a form that I will disseminate to a large group of people. After filling the form, I'd like them to be able to hit a submit button that sends the data (or the entire form, whichever is most effective) to an FTP server that will store the data so I can import it into a .response file and eventually export to Excel.
    The web team at my university has set up an FTP server that has login credentials for a dropbox and different credentials to manage files in that dropbox. When you visit the sites in firefox, it asks you for a login.
    I've created the submit button on the form, and I followed the steps included in the LC Designer help. I've tried all four "submit as" options. My FTP site address is in the "Submit to URL:" box (as ftp://xx.server.edu, where xx and server are the location provided to me by the web team). When save it, open it in Acrobat, and insert test data into the form and press submit, however, nothing happens. I get no login dialogue, and no files appear in the dropbox.
    The server people don't think it's an issue on their end, as I can access the FTPs through a browser, so clearly I'm doing something wrong with the design of the form or the setup of the Submit button.
    Any help is greatly appreciated!
    Cheers

    Acrobat/Reader does not support the FTP protocol. You could submit via HTTP to an interneadiary program and have that do the FTP submission on your behalf. Or that pragram could write the data file to the file system (assuming it is on the same physical hardware).
    Paul

  • Date problem in a form

    Hi:
    I have a form (in jsp) where in I have a field for Date. The Date is entered in the form: 12/18/2002. I using beans to retrieve the form values and then pass to the program. THe date field is passed as String to the bean. The program changes the String to util date
    (assignment ===> name of bean)
    String strDate = assignment.getDueDate();
    java.util.Date adate = null;
    DateFormat fmt = DateFormat.getDateInstance(DateFormat.SHORT,Locale.US);
    try {  
    adate = fmt.parse(strDate);
    System.out.println("Util date in Bo: "+adate);
         catch (ParseException e)
              System.out.println(e);
    and before inserting into database, it is changed from util.date to sql.date.
    long time = adate.getTime();
    java.sql.Date sqldate = new java.sql.Date(time);
    Until now everythign is working fine. On my way back, when i retrieve the sql.date from the database, I change it to util date:
    java.sql.Date sqlDate = rs.getDate("dueDate");
    java.util.Date uDate = sqlDate;
    and then covert this util date to String
    String strDate = uDate.toString();
    When I display this string date on my form... it is in the format
    2002-12-18, although i have inserted it in 12/18/2002 format.
    Can anyone help me since i want my date to appear on the form in the format I enter (12/18/2002) and not the 2002-12-18 format of database

    Already answered elsewhere.

  • Strange Issue: Hyperion Planning forms becomes read-only and data is wiped out: 11.1.2.2

    Hi,
    Let me start by saying that I am not new to Hyperion Planning. We are experience a weird issue in our System Test. We notice that some (NOT ALL) of our webforms turn into readonly webforms; all the cells on the form at greyed out. This is inspite of the fact that the read-only checkbox is unchecked on the form as well as security is fine on all dimensions ; basically all the cells on the form are valid combinations.
    Still the form become readonly and all the data in that form is wiped-out. this happened only for two web forms so far. We are running bunch of calcs(none of the calcs have cleardata command). we are not sure why is this happening. this might be some bug in the product... not sure. has anyone seen this behaviour before ?
    please let me know.
    pk

    Please Ignore this question. This happened because someone in my team had added an member below a level 0 entity.

  • Performace problem with 10g forms

    We have just migrated from 6i forms to 10g forms. The application takes a lot of time to load each form. In the status bar I can see the it is trying to open each gif file of the forms menu.
    one question, if I have created a jar of all the gifs, where will the applet pick it up from. Right now I have a jar that is put in /forms/java as well as a virtual directory pointitn to a path on my hp-ux server which has all the gifs and it seems like the applet picks it up from the virtual directory path.
    Navigating through a hierarchical tree is also much slower.
    Have i missed out something?

    Hello,
    REP-56107: Invalid environment id {0} for Job Type {1} in the command lineCause:
    The envid specified for the job is not defined in the server configuration file.
    Action:
    Specify an envid that is already defined in the server configuration file or define a new envid in the server configuration file and restart the Server.
    It seems that the parameter envid is used in the reports request and this environment is not defined in the reports server configuration file :
    For more details :
    http://download-uk.oracle.com/docs/cd/B14099_17/bi.1012/b14048/pbr_cla.htm#sthref2786
    Regards

Maybe you are looking for