Date problem in the form

I have a field called exp_date data type is date in the database and also in the form.
In the recieving form field this date is entered as 2010/03 (year.month)
In my irradiation form the exp_date( scanned or entered as 201003) YYYYMM, is validated against the recieving table
and then based on the month I have to update my exp_date in irradiation form to the last day of the month. I ndo all the conversion and that works fine.
If march then 31, If april 30 etc.
I have master codes table where we store codes.
01 - 31
02 - 28
03 - 31
etc
v_exp_date1 varchar2(11);
v_exp_dat2 varchar2(11);
v_exp_date3 varchar2(11);
v_udf1 number;
v_complete_string varchar2(11);
v_exp_date date;     
Cursor C3 is Select to_char(exp_date,'MM')
     from supplies_received
     where lot = :plt_irradiation_log_t.lot;
Cursor C2 is select code,udf1 from master_codes
where code_type = 'DAYS'
and term_date is null
and code = to_number(v_exp_date1);
Cursor C4 is Select to_char(exp_date,'DD')
     from supplies_received
     where lot = :plt_irradiation_log_t.lot;
Cursor C5 is Select to_char(exp_date,'YYYY')
     from supplies_received
     where lot = :plt_irradiation_log_t.lot;
     open c3;
     fetch c3 into v_exp_date1;
     close c3;
     Open C2;
     Fetch C2 into v_day,v_udf1;     
     Close C2;
     open c4;
     fetch c4 into v_exp_date2;
     close c4;
     open c5;
     fetch c5 into v_exp_date3;
     close c5;
v_complete_string := v_exp_date1||'/'||v_udf1||'/'||v_exp_date3;
:plt_irradiation_log_t.exp_date := to_date(v_exp_date1||'/'||v_udf1||'/'||v_exp_date3);
:system.message_level := '10';
commit;
:system.message_level := '0';
v_complete_string is varchar2(11); If I make it date there is no action.
Now my exp_date is null.
I need help to populate exp_date.
Thanks in advance
Anu

I think your problem is the TO_DATE you use without giving a format-mask:
:plt_irradiation_log_t.exp_date := to_date(v_exp_date1||'/'||v_udf1||'/'||v_exp_date3);
try changing it to :
:plt_irradiation_log_t.exp_date := to_date(v_exp_date1||'/'||v_udf1||'/'||v_exp_date3, 'DD/MM/YYYY');btw... As fas as i understand your code you only want to get the last day of the date which matches :plt_irradiation_log_t.lot. If so, you may reduce your code to
DECLARE
  Cursor C3 is
    Select LAST_DAY(exp_date)
      from supplies_received
     where lot = :plt_irradiation_log_t.lot;
BEGIN
  OPEN c3;
  FETCH c3 INTO :plt_irradiation_log_t.exp_date;
  CLOSE c3;
  -- the rest of your code
  :system.message_level := '10';
  commit;
  :system.message_level := '0';
END;

Similar Messages

  • Data remains in the form

    i have a form which contains trainee information,
    in one section having payment option
    1 cheque(cheque no,issue date,amount,valid up to)
    2.cash(Amounts)
    this field are display conditional
    means when i select cheque(cheque no,issue date,amount,valid upto) this fields are display in the form.
    like Amount also.
    i user radio buttons for payment option with submit
    and used source used-"only when current values in the session sate is null" for all fields in the form
    after i enter the data in the form the data in the fields are remains (cache is not clear)
    i us a branch to the same page ,in the action section i use clear cache(enter the page no),
    but my problem is when i use this(clear cache-page no) payment option buttons are not working,
    if clear the cache(if i remove page no) in the Action section of branching the data remains in the form.
    how to get rid of this problem

    Hi Alekh,
    I now have no idea. What I assumed you had was the following:
    - Page loads and all that is displayed is a radio button group with Cash or Card options.
    - If select cash and an "amount" field appears
    - If select card then card detail fields appear..
    If you see the fields already then why do you have the radio buttons to be with submit?
    Scenario A
    If the details are meant to be processed once the radio button (cash/card) has been pushed then what is the problem with it processing the input and then clearing the data? I thought this is what you want...
    Scenario B
    If you actually have some kind of "Submit/process" button that does the processing rather than this radio button then make the radio button a normal one without submit. This would mean that clicking the radio button doesn't clear the fields, only when the submit button has been pressed.
    In both of these scenarios you could clear the data using the always replacing option
    Mike
    Edited by: Dird on 13-Aug-2009 02:20

  • Sending Date parameter  from the form to Report

    Dear Friend
    Hi everybody, I am sending the date parameter to my report through a form ,and my date format in the form and in the report as follow : DD/MM/YYYY but when I enter the date as 18/1/2004 the system pass this value as follow : 18-JAN-04 but I want the system to pass my date format as 18/1/2004 not as 18-JAN-04 ,how can I do that
    Best regards
    Jamil

    Ino,
    thanks for your answer.
    You're all rigth abouth the index issue. So I've written my SQL like you say in your post. But i get an error : "ORA-... Non-character found where character expected... " or something like that. I've checked nls_date_format in my client machine and the server (DB 8.1.7.4), and also the regional settings in both machines, and all are set to 'DD-MON-YY'. What can be wrong?
    Thanks again for your time.
    Jaime.

  • Importing XML Data Back into the Form

    I have a form that shows several subforms based on the selections the user has made while filling in the form. This is working quite well but when I import the XML data back into the form it doesn't show the subforms that have been used.
    Is there an easy way to change this?
    Thanks in advance!
    Emma

    Actually the issue may actually have to do with the fact that the connections aren't bound, but I haven't seen the data.
    I have some fairly complex forms that include both subforms and instances, have an XSD embedded and export as XML. When I import the data, everythi
    Now, that being said...
    Are your subforms "hidden" and you opt to display them upon selection of a radio button for example, or do you SetInstances()? If you're using visible=TRUE or FALSE, that may also cause some issues.
    Try this -- on Form:ready try this code:
    if(this.rawValue == "on"){ //this radio button 1
    _subform1.setInstances(1);
    _subform2.setInstances(0);
    _subform3.setInstances(0);
    else if(this.rawValue == "on"){ //this radio button 1
    _subform1.setInstances(0);
    _subform2.setInstances(1);
    _subform3.setInstances(0);
    else if(this.rawValue == "on"){ //this radio button 1
    _subform1.setInstances(0);
    _subform2.setInstances(0);
    _subform3.setInstances(1);
    else { // this is fisrt time open -- i sometimes had issues with subforms being visible on first entry
    _subform1.setInstances(0);
    _subform2.setInstances(0);
    _subform3.setInstances(0);
    Then on:Click essentially copy most of the code you put in form:ready
    if(this.rawValue == "on"){ //this radio button 1
    _subform1.setInstances(1);
    _subform2.setInstances(0);
    _subform3.setInstances(0);
    else if(this.rawValue == "on"){ //this radio button 1
    _subform1.setInstances(0);
    _subform2.setInstances(1);
    _subform3.setInstances(0);
    else if(this.rawValue == "on"){ //this radio button 1
    _subform1.setInstances(0);
    _subform2.setInstances(0);
    _subform3.setInstances(1);
    Of course this will go on top of your radio button group.
    If you are exporting to XML, it will make your life a whole lot easier, by the way, to import an XSD and bind your nodes, especially as your forms and data start to get more complex.
    Finally, you may also know this but -- unless you have Forms Server, any user that wants to export the data or import the data will need to have at least full Acrobat Professional. If you want people to be able to save data in the form but import/export isn't that important, they will need to have full Acrobat.
    I hope that helps a bit. Good luck!
    Lisa

  • Will apple next update to help fix the location following data problems will the ipod touch 2g be included ?

    will apple next update to help fix the location following data problems will the ipod touch 2g be included ?

    Chances are the 2g itouch will not be included in the update. Also no one yet knows if it will be fixed in the next firmware but apple has said they know of this bug.

  • How can i read the data fromtext fieldsin the form of bytes??

    Hi friends,
    How can i read the data fromtext fieldsin the form of byte string while using Socket connection.
    I have two text fields. i need to send the data from the textfeilds to the server using a byte string.
    Can anyboday help me???
    KK

    Does <cfdbinfo> work for Access DBs?
    You might be better off asking this on a MS Access forum.  It's more of an Access issue than a CF one.
    Adam

  • Show alert after data display from the form

    After query, if date of birth is NULL then display message, but this message must pop up after data displays on the form.
    I try different post triggers, when-new-item-instance, when-validiate-item trigges, they all display message BEFORE the data. Any suggestion?
    Thanks

    hi kathy,
    What you have to do is after the commands to display the data, you give the builtin SYNCHRONIZE; then give message statement. It should work.
    Murthy

  • Filling out the date fields in the forms

    Hi,
    I'm trying to fill out a form (http://www.uscis.gov/files/form/i-134.pdf). The regular text fields are working fine, but I've problem with date fields in this document.
    When I set the value of any date field (e.g. see "Date submitted" in the middle-right of last page), Acrobat Reader assigns the same value to all other date fields - which is completely wrong. And if I delete any value it has assigned, it deletes the values of other date fields as well.
    Is it a bug in Reader, or something is wrong with the form? I've the latest Reader 8.1.2 + security patch, running on Windows.
    Regards,
    Michael.

    It is the design of the form. It isn't a bug of Adobe Reader or Adobe Acrobat.

  • Can any one help me to configure the mysql table to enable user expiration to function, I have tryed most things, but not dates are being passed back to the data base from the form

    Im trying to build  user expiration into my registration form, but I cant get the form to send back the date registering.
    in my data base i have tried every thing from timestamp to datetime. I can get a timestamp but it is not functioning with the expiration?

    just have a look at my tutorial Login tables: installation & configuration where the required column attributes are explained and where you can obtain a fully functional SQL dump for a typical ADDT "login" and (optionally) "login_stats" table.
    BTW, "expiration" will have to be an "int" column.
    Cheers,
    Günter

  • How can I change my account on icloud without losing all my data and suppressing the former account. I just need to change the email address... TKS

    I changed my email address, how can I keep my icloud data without cancelling my former account...?

    Hey there Fonz111,
    It sounds like you have a new email address you would like to use to replace the email address you are currently using for your Apple ID, without losing any of the info you have in the account. You can update the email address with this article named:
    Apple ID: Changing your Apple ID
    http://support.apple.com/kb/ht5621
    To change your Apple ID, follow these steps:
    Go to My Apple ID (appleid.apple.com), click "Manage your Apple ID", and sign in.
    If you have two-step verification turned on, you'll be asked to send a verification code to the trusted device associated with your Apple ID. If you are unable to receive messages at your trusted device, follow the guidelines for what to do if you can't sign in with two-step verification.
    In the "Apple ID and Primary Email Address section," click Edit.
    Enter the email address you want to use, then click Save Changes. Apple will send a verification email to that address.
    Open the email from Apple, then click Verify Now in the email.
    When the My Apple ID page opens, sign in with your renamed Apple ID.
    If you have two-step verification turned on, you'll be asked to send a verification code to the trusted device associated with your Apple ID.
    After you see a message indicating that verification is complete, remember to update all of the stores and services that you use with your Apple ID.
    Thank you for using Apple Support Communities.
    All the very best,
    Sterling

  • Read Data's from the Form step type at run time

    Hi Experts,
    I have the 'Form' step type in my workflow and it will displays some values at the Run time. In this form I have one IO field called 'Comments'. So at the runtime manager can Enter the comments on it.
    Now my need is I need to get the 'Comments' data from that form. How can I get this value?
    Thanks in Advance,
    Helps will be Appreciated..

    I got the solution.
    Thanks All..

  • 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.

  • Problems with the Form Editor and beans.

    Hi All!
    I created some visual beans, added it to the palette, and made use of it using the form editor. But somehow, I decided to move the bean to another package. Now, the problem is when I try to build my project, the forms referencing that moved bean is not updated. They still show(as fully qualified class names) the old package location of the bean. In simple saying, they were not refactored together with the moved bean. Please Help Me With this...

    Bet you had errors during refactoring saying that the occurrence is in guarded section and can not be refactored.
    Try to replace old references in *.from/*.java files outside the IDE.

  • Data stamp on the form or table?

    I need to create a auto data stamp, do I create that in table or the form any sample?

    Hi,
    just create a before insert, update on a table....
    CREATE OR REPLACE TRIGGER "AUDIT"
    before insert or update on TABLE1
    for each row
    begin
      :new.your_date_column := sysdate;
    end;
    /Aljaz
    Edited by: Aljaz on 5.3.2012 22:36

  • Is the 4G data problem on the Galaxy Nexus going to be fixed?

    Whether or not it's a software or hardware problem something needs to be done. I've been a 5 different forums now and everything I read about the 4G on this phone is negative, except for a few lucky ones. People are only getting 1-2 bars compared to other phones right next to them. They are also saying they are getting heavy decrease in 4G speeds. This is my first 4G phone but I think I would get better speeds than 4mbps download and 3mbps upload? I'm in Pittsburgh, a good 4G area. I've been a customer with VZW for a long time, plenty of upgrades and new 2 year contracts. I just dropped a lot of money on this phone and agreed to stay with VZW for another 2 years, I at least want a phone that is fully capable of getting the full 4G experience. If there is a problem with the Nexus as a device in general please let us know see I can get a different phone, if there is something wrong with the 4G let me know too so I can quit panicking!
    Sorry for rambling on but what is truly going on with this phone and the 3G/4G speeds, dropped calls and so on? I'm really getting aggravated and truly feel like I'm unappreciated as a customer.

    It seems more location based than actually the device.  I have various screenshots where I could go hours without even a dropped signal, but randomly for an short period of time I would lose signal due to the network(based on various devices owned with Verizon).  Though when I travel to say SF for work I may see it happen 2-3 times a day.  When I was with AT&T many years back when they were rolling out their 3G network I had similar problems with dropped calls, and data.  Since Verizon is deploying it quickly I doubt they did serious bug checking and figure to do it on the fly as they want to cover everywhere that has 3G with 4G.  At some point I believe Verizon want to go VOLTE+(Voice over LTE Advanced) which in turn may help with data prices and network congestions and hopefully they can get it as reliable as possible.

Maybe you are looking for

  • Need help in calculating a total from flowable table

    I've tried everything to include using the example from the tutorial on creating a flowable purchase order form.  My problem is that I can't get the total field to reflect a total.  I'd be willing to send the form to anyone willing to shed some light

  • How do I create a local account from a network login from the command line?

    I am connecting to my organization's domain using 3rd party software which doesn't allow for using the GUI for creating local accounts.  How can I do this through the command line or is there a better way to script it?  Thanks in advance!

  • I am thinking about upgrading my HTC Incredible to a Galaxy SIII

    I love my HTC camera, but constantly losing my 3g capability.  Think its just getting old.  I'm due for an upgrade.  Is the camera any good on this model?  I I saw a thread about poor signal strength.  I live in hills and use my cell for everything. 

  • Basic  Html  and script

    Hi, Although I did programmation. I know nothing in mobile phone I would like to find a really basic script and css embedded in an html file   Especially for the iPhone 4. JPD

  • Adding existing RWD uPerform documents using SAP Solution Manager Adapter?

    Note# 1468552 Cannot add existing RWD uPerform documents using the SAP Solution Manager Adapter. Currently, a user can only create a new document with the Solution Manager Adapter; there is no ability to add existing uPerform documents that have alre