Need to resolve date format problem in form

Hi,
i have a column in database needed_date its format is --------> mm/dd/rr
i need in my form a lov that uses the "needed_date" but displayed this date in oracle format which is ------> DD-MON-RR
, then I assigned this lov to :p_needed_date paramter which i have to put it in :global to be able to compare it later in my master block which is based on from clause query in this format i converted it through the following code ------->SelecT (to_char(to_date(:PARMS.P_needed_date,'DD-MON-RR'),'mm/dd/rr')) into :GLOBAL.fro_date from dual ;
as i canot in the where clause the following ---->(to_char(to_date(needed_date,'DD-MON-RR'),'mm/dd/rr')) between :global.from_date and :global.to_date
i get invalid month as i'm sure that the item is date type
so wht can i do ???

Hello,
Put the following in a PRE-FORM trigger, so that you would have no need to do any conversion nowhere.
Forms_Ddl('ALTER SESSION SET NLS_DATE_FORMAT = ''DD-MON-RR'');
Set_Application_Property(PLSQL_DATE_FORMAT, 'DD-MON-RR') ;
Set_Application_Property(BUILTIN_DATE_FORMAT, 'DD-MON-RR') ;Francois

Similar Messages

  • Date format Problem in forms&reports Services 10g

    Hi Dears,
    I Faced a problem during running reports ( i am using forms& Reports Services 10g), when i pass the parameters via parameter form to the report (built in forms10g Rel 2.0) its appearing in arabic like (25-يناير-2010) as my Date Formate is (DD-YYYY-MON) and NLS_LANG parameter is defined as Arabic_Saudi arabia.AR8MSWIN1256 so as a result report is not running due to unknown Date formate, how can i change the Same Date format (DD-YYYY-MON) to appear in english like (25-2010-JAN)
    Thanks

    You could specify the parameter as type VARCHAR2, explicitly cast it (maybe to DD.MM.YYYY) when you pass it from forms and cast it back in your query, like TO_DATE(:P_PARAM, 'DD.MM.YYYY')

  • Date format problem in forms?

    I basically want the following.. in a date text item.
    1st Jan 2008
    if DD is 1 character and
    20th Jan 2008 if DD is 2 characters.
    not
    01st Jan 2008
    20th Jan 2008
    In SQL i can do this with date format 'FMddth Mon, YYYY'
    In forms though this does not work.. any ideas?
    Thanks

    Looks like the pl/sql version used by Forms has a flaw in handling the fm and ddth parts of the date format together.
    If it is a display-only column, you can change its datatype to char, remove the format mask, and instead, change the Column Name property to something like:
    to_char(date_column,'fmddth Mon YYYY')

  • Date Format problem...

    Hi users,
    Forte version : 2.e.2 and ForteWebSDK
    Datacase : Oracle
    We have a problem with a simple HTML text field which acccepts
    a date. When we try to update the record with some date, the following
    exception occurs:
    24-Jun-1998 04:32:28 : XV01086 : Execute failed for SQL statement in
    project Rap
    tServices, class RaptSqlMethods, method updateActivity, methodId 104,
    line 51, e
    rror from database is:
    ORA-01830: date format picture ends before converting entire input
    string
    The Oracle manual says that the above exception occurs when there are
    some extra characters on that field, which is not the case. In fact,
    we raise our own exception for the cases like : o1-Apr-1997,
    01-apr-97 etc. The correct format is 01-apr-1998.
    Same date soemtimes is added to the database successfully. Waht I mean
    to say that the exception deos not occur consistently.
    We just conevert the String taken from the HTML field into a Forte
    DateTimeData Object and send it to database. May be, the conversion
    part is causing the problem. But, once again the problem is not
    consistent.
    Any ideas in this will be appreciated.
    Thanx in advance
    -Rajeev Talwar
    Get Your Private, Free Email at http://www.hotmail.com
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

    We had the same problem when our application first went live. The
    default date format for our Oracle database is 'dd-mmm-yy' without the
    time component. The default format for datatype DateTimeData is
    'dd-mmm-yyyy hh:mm:ss'. Since we did not want to change the default date
    format for the Database, we included in our service partitions an Alter
    Session statement to change the NLS_Date_format attribute in Oracle to
    conform to the Forte DateTimeData format. It worked.
    Kam Chow
    Mazda Australia
    -----Original Message-----
    From: Gary F Giger [mailto:[email protected]]
    Sent: Thursday, June 25, 1998 4:11 AM
    To: Rajeev Talwar
    Cc: [email protected]
    Subject: Re: Date Format problem...
    I was having the same problem a few weeks back when I would
    read/write
    dates to Oracle. I was using objects of type DateTimeData and I would
    occasionally get errors like you said you were. I found discovered my
    problem. Sometimes I would process a null date and would get an error.
    So to
    resolve this issue, I simply changes my objects of type DateTimeData to
    type
    DateTimeNullable. This enabled my Forte Application to handle regular
    dates
    as well as null dates. I have not gotten any oracle errors since then
    with
    regards to dates. Hope this helps.
    Rajeev Talwar wrote:
    Hi users,
    Forte version : 2.e.2 and ForteWebSDK
    Datacase : Oracle
    We have a problem with a simple HTML text field which acccepts
    a date. When we try to update the record with some date, the following
    exception occurs:
    24-Jun-1998 04:32:28 : XV01086 : Execute failed for SQL statement in
    project Rap
    tServices, class RaptSqlMethods, method updateActivity, methodId 104,
    line 51, e
    rror from database is:
    ORA-01830: date format picture ends before converting entire input
    string
    The Oracle manual says that the above exception occurs when there are
    some extra characters on that field, which is not the case. In fact,
    we raise our own exception for the cases like : o1-Apr-1997,
    01-apr-97 etc. The correct format is 01-apr-1998.
    Same date soemtimes is added to the database successfully. Waht I mean
    to say that the exception deos not occur consistently.
    We just conevert the String taken from the HTML field into a Forte
    DateTimeData Object and send it to database. May be, the conversion
    part is causing the problem. But, once again the problem is not
    consistent.
    Any ideas in this will be appreciated.
    Thanx in advance
    -Rajeev Talwar
    Get Your Private, Free Email at http://www.hotmail.com
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive<URL:http://pinehurst.sageit.com/listarchive/>
    Gary Giger
    Raytheon Systems Company
    300 Science Park Road
    State College, PA. 16804
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>
    This message has successfully passed virus checking.
    Mazda Australia takes every precaution to ensure email messages are virus free. For complete protection, you should virus test this message.
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

  • How to change the date format in xml form?

    hi,
    How to change the date format in xml form?
    For example:  11/20/2008 3:00:03 PM    ->   11-20 03:00
    Any opinions greatly appreciated!
    Thanks.
    Edited by: ke wenxing on Dec 2, 2008 8:33 AM

    You could go to System - User Profile - Own Data would take you to the "maintain user profile screen"
    Click the defaults button and change the date format.This changes date format for all the dates in your login.

  • Date Format (Need result in date format)

    Dear ,
    i have worked on this query which produce result in error, infact i need result in date format and this format 'MON-YY'. :
    select to_date( EFFECTIVE_DATE,'MON-YY' ) as MON_YY FROM GL_JE_LINES
    but now EFFECTIVE_DATE is like this format '12/31/2008'

    I tell again: a date has no internal format.
    There is only a default output-format for date-objects wich is used as default output format and for implicit date conversions.
    If you want to know the actual nls_date_format for your session you can use:
    select * from nls_session_parameters where parameter='NLS_DATE_FORMAT';You can change it for your session with:
    alter session set nls_date_format='<your_new_date_format>';Please take a look at:
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/initparams122.htm
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/sql_elements004.htm#sthref405
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/sql_elements003.htm#BABGIGCJ
    The internal storage of a date-object does not depend on the actual value of NLS_DATE_FORMAT.
    This will only used for output and for implicit conversions e.g. with to_date or to_char without explicit format.
    To select a date from a table is also an implicit conversion to character, because you want to see characters on your screen.
    Edited by: hm on 29.12.2010 04:20

  • Data format problem

    Hello All
    Can anyone help me to solve this data format problem? On the top of my program, I have declare the two variables "purchasePrice" and "purchaseAmount" as double. I dont know why, the compiler still think I didnt initialize this two variables? I have printed the error message below the code.
    Thanks for your help : )
    Jen
    =============================================================================
    double purchasePrice, purchaseAmount, GPS, total_gain, amount;
    //Find the purchase stock price
         rs = stmt.executeQuery("SELECT Price FROM PORTFOLIO WHERE Username = '"+ username+"' AND Symbol = '"+strsymbol+"'");
         while (rs.next()){
              purchasePrice = rs.getDouble("Price");
    //Calculate the amount of Gain Per Share
    GPS = intask - purchasePrice;
    //Find the purchase stock amount
    rs = stmt.executeQuery("SELECT Amount FROM PORTFOLIO WHERE Username = '"+ username+"' AND Symbol = '"+strsymbol+"'");
         while (rs.next()){
              purchaseAmount = rs.getDouble("Amount");
    //Calculate the amount of Total Gain
    total_gain = amount - purchaseAmount;
    =============================================================================
    Error message:
    variable purchasePrice might not have been initialized
    [javac] GPS = intask - purchasePrice;
    [javac] ^
    variable purchaseAmount might not have been initialized
    [javac] total_gain = amount - purchaseAmount;
    [javac] ^
    [javac] 2 errors

    Instance and class variables are automatically initialized to their default values if they are not initialized explicitly, but local variables are not. They have to be initialized explicitly before they can be referenced.
    In your code:
        while (rs.next()){
            purchasePrice = rs.getDouble("Price");
        ...purchasePrice is initialized only if rs.next() returns true. purchaseAmount has the same problem. To avoid this problem, you could declare them by:
    double purchasePrice = 0;
    double purchaseAmount = 0;

  • XML Publisher to Excel Report : Date format problem

    Hi,
    I am trying to create an Excel report with XML Publisher. I have an issue with the Date Fomatting.
    In the XML template, I have set the "Date" column in date format. But the excel output report "Date" column returns as "General text" (string) and it is sorted as text, not as date.
    Can anyone please help me out?
    Thanks!!!

    Hi,
    Did this post solve your problem? I have the same issue that I need to solve.
    I have an xsl-fo template with dates in it.
    The dates are in english.
    My excel is setup to use danish.
    When I export to excel it knows the month jan, feb, mar, apr, ... which are the same in danish and english.
    But months where it differs like may (danish maj) the cell is a general text instead of date.
    Is there anyway you can set/transform the date in the xsl-fo template so it does not care about the language in excel?
    Thank you in advance.
    BR Kenneth

  • Date format in smart form

    How can we change the date format in a smart form.

    define a var of type string in global
    1)get the req date use edit mask function to modify it
    2)convert tthe date as u wanted in program lines in smart form
    3)assign the same to the string variable & then u can display the same
    i hope this works
    close the thred if problem is solved

  • Change date format in PO form

    Hi,
    Currently, the delivery date printed in PO form is in the format of mm/dd/yyyy.
    If I will change the month format into text, say for example, FEB-07-2011, how can I make this happen?
    Is there any other way to accomodate this other than change the print program/form?
    Thanks!
    Best Regards,
    Armie

    Hi,
    Date format copy from setting which you have done in  t.code: SU3 or SU01 in Date Format in Default tab,If you want you can change it according to your requirement.
    Or as you need check your SMARTFORMS which assigned to your PO message type ( NACE) with which you print PO and see possible conversion as required by you with your ABAPer.
    Regards,
    BIju K

  • Date Format problem in a Spanish OS?

    Hi Experts,
    I have been stucked with this weird problem I am experiencing right now. I am able to process the date formats using SBO 2007A PL 37 and an English OS (XP, Vista) with no problem. But when we test the same application on a Spanish version of XP, I am getting an invalid date format.
    Btw, in an English OS I can process all sbo date formats (mm/dd/ccyy, mm/dd/yy, dd/mm/yy, dd/mm/ccyy, ccyy/mm/dd, dd/month/yyyy). Is there anything else that I need to check somewhere?
    Thanks,
    Marlon

    Hi Marlon,
    The OS Local definitions. Different countries have different date formats for their location. Check the date format of the OS CultureInfo settings.
    Regards,
    Vítor Vieira

  • CLIENT_OLE2 date formatting problem while reading from Excel

    I have installed webutil package and tested that everything works by running webutil_demo as well as WU_TEST_106 form. Then I had implemented reading from Excel sp. sheet using Oracle note 813535.1 (This note has OLE2 code sample on how to read an Excel file). Everything fine till now. The problem started when I have a date fiield to read from Excel. The field where the value is going to has format mask of 'DD-MM-RRRR'. When the date is displayed in the form, it shows '01-AUG-0009' instead of '01-AUG-2009'. I tried changing the date format to different formats in Excel but no go. I found one blog which stated that treat the date as number and use e.g. "cell_date_value:=to_date('01/01/1900','DD/MM/YYYY')+client_OLE2.get_num_property(cel,,'Value')+2" but it too did not change the display. Then I tried debugging and stepping through the code..the only thing I noticed that OLE2 function displayed the date with 2 digit year as 09 and when the code completed execution, the date went back to '01-AUG-0009'. Casting with 4 digit year at every step in the code is not helping to change final date display correctly. Any idea?!!!

    Hi,
    While reading the date column from excel, try using
         m_col_val := OLE2.get_char_property(Workcell,'Text');
    Instead of
         m_col_val := OLE2.get_char_property(Workcell,'Value');
    I think you problem will be solved...
    hello...i meant client_OLE2
    Regards
    Dora
    Edited by: Dora on Sep 16, 2009 11:05 AM

  • XIR2 - Date format problem in pdf file when scheduled to refresh

    We have a number of Deski reports that are scheduled to refresh daily and then be saved as pdfs to a network drive.  Despite the date format being correctly displayed in the reports stored in the respository, when the scheduled jobs save the reports as pdfs, it is changing the date format to the American format, i.e. 11/13/2007 instead of 13/11/2007.  I've checked both the Date/Time and Regional Settings on the server and they are set correctly.  If I log into Deski on the server and open a report and manually save it as a pdf, it saves it with the UK format.
    So what do I need to change to get the scheduled job to use the UK date format?

    Hi Anne,
    If you schedule reports through Infoview then please perform below steps.
    - Login to Infovinfoview -> go to Preferences.
    - Change the My interface locale is to "English (UK)" and My current Timezone to appropriate time zone under Genera tab.
    - Log off and login again.
    - Try to schedule the report to PDF or any other format and check the issue.
    If you schedule reports through CMC, then change Timezone setting to appropriate timezone in Preferences and schedule the reports.
    Thanks and Regards,
    Purna.

  • Quicken 2007 date format problem in Mavericks

    Objective: Get date format in dd/mm/yyyy format in Quicken 2007 (Lion compatible version).
    Current OS: Mavericks 10.9.4
    Hardware: Retina MacBook Pro & iMac 27" 3.2Ghz
    Problem:
    On my rMBP with Mavericks 10.9.4, I’m able to get Quicken 2007 data in dd/mm/yyyy format, as desired.
    On my new iMac (late 2013) with 10.9.4, Quicken recognises the System date formats dd/mm/yyyy (setting up a new register shows System date format) but the registers and data are all in m/d/yy.
    Quicken prefs are set to Canadian, so date formats should automatically be in dd/mm/yyyy, but aren't.
    The Quicken data file is identical on both Macs. The original file goes back to 1991, and has been through all Mac OS iterations since then.
    Pre-Lion, I remember that the workaround was to set the Language & Region to something (English / US, don’t remember which) and then change date formats. Anyway, the dd/mm/yyyy stuck, through Lion and Mavericks on my rMBP, but is causing a problem in the iMac.
    My guess is that Quicken is unable to / blocked out from accessing System date formats in Mavericks 10.9.4.
    Wondering if there’s some way to make Quicken access the Mavericks System date format, and stick to it?
    Possible approach: If some expert in these forums knows how Mavericks works under the hood, how it allows other apps access to System Prefs like date formats etc., perhaps a script or Terminal command could force Quicken 2007 to recognise and accept date formats from System Prefs (Language & Regional settings).
    I'd really appreciate the help; needless to say, the Quicken data is vital to my work.

    Hi Marlon,
    The OS Local definitions. Different countries have different date formats for their location. Check the date format of the OS CultureInfo settings.
    Regards,
    Vítor Vieira

  • Date Format problem in ABAP Proxy

    Hi All,
    We have a Inbound ABAP proxy which recieves data from XI.
    We use a date field in that which is defined as DATS datatype.
    When we trigger the interface from XI with date in format YYYYMMDD, we are getting an exception.
    when the date is sent in format YYYY-MM-DD, the interface is run successfuly.
    when we test the interface in SPROXY transaction the date is displayed in YYYY-MM-DD format.
    does it have anything to do with the defenition of the date format in XI?
    I want to know whether DATS format in XI is different from ABAP?
    should the date that is sent from XI be in YYYY-MM-DD format all the time.
    Kindly suggest a solution for the date problem when it is passed from XI to ABAP proxy

    Hi Uday,
    Check the pattern used in XI/PI for the date definition.
    If it's set to:
         pattern="[0-9]-[0-9]-[0-9]"
    Then it will enforce the pattern. You could try changing the pattern in XI to exclude the hyphen then you have a normal DATS format.
    Regards, Trevor

Maybe you are looking for

  • Help with divs and columns please?

    Hello all, I'm quite new to dreamweaver and having problems. I am designing a site with 3 columns (left for nav, middle for main content and right for offers & advertising etc.) I am using tables within the divs to organise content and I have aligned

  • Javax.ejb.EJBException while opening the IR Objects in PI7.1.1

    Hi All In our projects we are movig XI3.0 objects to PI7.1, for that we have done the Export of IR objects from XI3.0 & Import it in PI7.1. All the objectys are imported successfully in the IR of PI7.1. But when we are trying to open the objects & do

  • Probing a COM port

    A colleague of mine is using an OMEGA brand handheld thermocouple meter to measure up to four temperatures from his rig. The device has an RS232 computer link to download the real-time data to an application provided with the device. My colleague wou

  • InDesign crashing in CS5.5 on OS 10.8 and 10.7, mid 2012 macbook and late 2011 imac

    @indesign on twitter recommended i paste my crash report here. Enjoy! pastebin.com/W62vhw9S

  • Create Boot DVD?

    Is it possible I can create a DVD that I can boot my iMac from? I'm not interested in preserving my current environment, just having a generic session to boot to. I need to check if there are software conflicts that are causing my iSight not to work,