Issue in Updating Date Fields in JDBC

Hi Experts ..
  I am having issues in updating date fields in Oracle Database.
My Sender Sends date in format 2007-05-19T14:34:55.0000000+02:00
Can any one please suggest me how does the above format can be updated in JDBC with format 2007/05/19
Thanks !

Hi,
See this Scree shot
http://img517.imageshack.us/my.php?image=16324662pf7.jpg
Take the Substring Function From Text Functionsand mention the position from 0 to 10 to take the Date alone from the Whole String which is getting in Source Field.
And after that apply the Transform date Function fron Date Functions and mention the source date format and the target date foramt that needs to convert into.
REgards
Seshagiri

Similar Messages

  • How can I update data fields in a merged document ?

    Hi,
    I'm looking for a way to update the values of data fields in a merged document with a script just as you can do with the user interface.
    I don't find any method like "updateDataFields ()" in the DataMerge object.
    Si I try to invoke the menu action "Update Data Fields", but it fails. The script error message is: "Error 53762, the script is not active." On the contrary, the action works if I use the interface.
    Can anyone help me?
    Thanks in advance,
    FredIsnard
    PS : I work with CS5.5 and JavaScript.

    Hi!
    You might be looking for this one:
    DataMerge.mergeRecords (outputOversetReportFile: File )
    Merges records and produces an optional overset report.
    outputOversetReportFile: Data Type: File
    The path to the file in which to store the overset report. (Optional)
    Best regards,
    Andreas

  • Error while updating Date Field on Process Form.

    Hi,
    I am using java code to pre-pop date on the process form.First I used a java code whic took java.sql.date as input and returned the same java.sql.date.But it gave an error that:java.lang.String cannot be converted to java.sql.date.......
    So I changed the java code and now it takes string as input and returns java.sql.date. This code works fine for Pre-pop adapter and the date is populated on the process form.
    But when i use the same code in a Process Task adapter to update the date, then it gives the following error:
    ERROR [ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)' XELLERATE.ADAPTERS - Class/Method: tcAdpEvent/updateDataSetValuePost encounter some problems: Adapter Execution Error: updateDataObjFieldValuePost: error updating UD_OID_USR_DATE_OF_BIRTH
    ERROR [ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)' XELLERATE.ADAPTERS - Class/Method: tcAdpEvent/updateDataSetValuePost encounter some problems: {1}
    Can anyone suggest any method to update date field on process form?

    Hi Abhi,
    Can you tell me how you have implemented populating an UDF based on Prepopulation of another UDF. I have a similar kind of requirement. It would be great if you share your code or relevant part of it.
    Regards,
    Sunny Ajmera

  • Update Date field automatically

    When a user is adding a new entry I want two of the fields in the table to be automatically updated without the user knowing (hidden fields), I want a current date and time to be entered into the Updated Date field and the :APP_USER to be entered into the Updated_by VARCHAR2 field.
    How do I go about doing this can I just put code to do so into the source of ITEMS or do I have to create a process?
    Thanks
    s

    S,
    Triggers are a good method, see this thread:
    Re: Table Trigger Syntax
    Jeff

  • How to update date field in oracle using jdbc

    Hi all,
    In my database i have a column LAST_UPDATED_DTTM which is used to store last updated date . when i try to update using the following query stmt
    update MD_TABLE set LAST_UPDATED_DTTM= + " new java.sql.Date(c.getTime().getTime()) where PROD_ID=" + msdn ;
    ' c ' is instance of Calendar Class as below
    Calendar c=Calendar.getInstance()
    it gives the following error
    ORA009:Expected date got number
    can anybody please help with this?
    Thank you

    can't i do that without prepare statement?If you insist on stuffing that String, then format it in some convenient String format using SimpleDateFormat and call the TO_DATE function in Oracle, so that the database understands your Date too.
    ***Annie***

  • Issue during Updating Data

    Hi All,
    I have data from 0mat_plant_attr loaded in an DSO.Further data is loaded from DSO to Cube.This was successfull initially.The Cube also has a load from Stocks cube(0IC_C03).
    Later there was a new field added to the DSO. This new field is defined as Char(1) in Data fields of DSO. Deleted the DSO data and added the new field.This field has a formula written in transformations. It was fine and reloaded the data to DSO.
    Now when I do a load from DSO to Cube the load fails.I defined the new field in the Cube in one of the dimension of the cube.
    I mapped the new field in the transformation defined from DSO. and in the transformation from Cube to Cube I made it Inital.
    I dont' understand where I am going Wrong... The Error I see is the following:
    -> Request 11111(Red in Status)
        ->Generate Request (green)
        ->Set Status to 'Executable'
    ->Process Request (Red)
      ->Data Package1: Errors during Processing (Red)  
      ->Extraction from Infocube(green)
    ...................................................(green)
    -> Updating to Infocube ZXXXX  (Red)
         -> Error While Updating to target ZXXXX
         -> Processing Terminated
    Appreciate your help in Advance.
    Regards,
    Harika.

    Hi Harika,
    I mapped the new field in the transformation defined from DSO. and in the transformation from Cube to Cube I made it Inital.
    from cube to cube in transformations change rule detail as direct assignment for that new infoobject.
    and activate transformations and load data from 1st Cube to 2nd Cube.
    till first cube data is properly loaded right.
    Regards
    Daya Sagar

  • Issue in displaying DATE field in Excel sheet

    Hi All,
    Kindly help me with the below issue:
    A report program when exexuted fetches the data's from database tables and populates in to an itab and the same is then moved to a itab which is declared like this:
    DATA: BEGIN OF t_downd OCCURS 0,
            line(4096) TYPE c,
          END OF t_downd.
    This T_DOWND will have all the obtained records and the same is used to pass the entries to GUI_DOWNLOAD function module inorder to save the excel sheet in '.csv' format to the desktop.
    The issue is the user wants the 'DATE' field to be displayed in 'DD-MM-YYYY' format in the excel sheet. So I have fetched the date based on the position(fdpos) and used the concatenate statement separated by '-'. Now when I run the program, some dates are not getting displayed in 'DD-MM-YYYY' format and some dates are getting displayed correctly as per the requirement.
    While debugging also, I could find the date value in T_DOWND in the 'DD-MM-YYYY' format only. Not sure where it is actually getting changed and why.
    Can some one please provide a soultion for this.
    Thanks,
    Deepa

    Hi Soumya,
    Thanks for the reply!
    I declared a constant in the below format for the quotes:
    constants : c_quotes type c value ''''. (i have put 4 quotes)
    Now i have concatenated the above quotes to my date value.
    But the output in the excel sheet is now getting displayed like this '30-02-2011
    All the dates are getting displayed in the correct expected format, but the only issue is we are getting an extra quotes in front of the date.
    Can you please suggest why this is happening.
    Thanks,
    Deepa
    Edited by: Deeparani.D on Jan 9, 2012 11:53 AM
    Edited by: Deeparani.D on Jan 9, 2012 11:54 AM

  • I want to update date field in oracle table using database adaptor

    Hi Guys,
    I want to update date in oracle table field which is 'DATE' type , but i am getting following error.
    Pure SQL Exception.
    Pure SQL Execute of update crp3apps.IFACE_SO_DATE_CHANGES set PROCESSED_DATE=? where CTRL_ID=? failed. Caused by java.sql.SQLException: ORA-01830: date format picture ends before converting entire input string
    The Pure SQL option is for border use cases only and provides simple yet minimal functionality. Possibly try the "Perform an operation on a table" option instead.
    </summary>
    </part>
    - <part name="detail">
    <detail>
    ORA-01830: date format picture ends before converting entire input string
    </detail>
    i am formated the date using following code and assigned to one variable.
    ora:formatDate(ora:getCurrentDateTime(),'dd-MMM-yyyy hh:mm:ss ')
    this is update query
    update crp3apps.IFACE_SO_DATE_CHANGES set PROCESSED_DATE=#date where CTRL_ID=#id
    Please provide solution.
    regards
    janardhan

    The thing is that XSLT often doesn't deliver the functionality required when it comes to times.
    You suggest appening "Z" to the time but this means that the time is now in UTC time. What if the system from where the date is being converted is running in NZ using local time? Other systems that recieve the date (and correctly handle the time zone) will now have a time that is out by a number of hours.
    You often can't ignore the time zone (drop the 'Z') as if you send the time to a system it has to either assume the time is local to it (which may not be the case... the other system coudl be in a different time zone) or assume the time is UTC (I think crossfire does this by default).
    Typically can't just append a time zone (e.g. +11:00) either as many places have daylight savings so the value to appended is variable (you then need some way of determining what the value is... either Java Embedding or a Service).
    As you mention it does depend on the use case but in many circumstances using Jaba Embedding, not as suggested above but with the appropriate Java.util.Calendar classes, is the best way to handle date and time in BPEL. Even still you need to ascertain the format of times external to the system and ensure you parse them correctly.
    ANd even if you do all this you can still run into problems. I've seen a real world example where two systems which both handled time zones correctly and had previously been working together for quite a while, satrted reporting different times. It turns out that only one of them had had the most recent Java Time Zone patches applied and there had been a change in the dates for daylight savings here (Australia). Be warned!

  • Help with Updating Data Fields in Merged Document

    I'm working in InDesign CS5 v7
    I have a multipage report, all using one master page for about 80  seperate records. Each page has their own linked graphs/images.
    We  now have need to alter the source data, and while these alterations can be seen in  'Preview mode' on the Master Page, they are not carrying through  into the pages themselves. No amount of 'Update Data Source' clinking changes this,  and the 'Update Content Data Fields' remains greyed out...
    I really don't want to have to remerge the whole document, as I will loose all of the linked graphs and images.
    Can anyone help?

    You've seen the other thread, so I think you already know the answer...

  • Update Date Field in Table Row to SysDate

    This appears to be an easy thing to do, but I can't figure out the best way to do it.
    I have a table with 2 input text boxes and some output text boxes.  When either input text box changes for a row, I need to update the date in one of the output text boxes in the same row to the current date. Then, when I commit the changes, the database should show the current date for that date field in that record.
    I'm using JDev 11.1.1.6
    Thanks,
    Ray

    Any help would be appreciated.
    I figure the RowImpl class is being instantiated when the table loads.  Is there a method in the RowImpl class that gets called when a row is changed?  Should I have an action on my submit button that scrolls through all rows to see if any are dirty and update the date from there?
    Please help.

  • BAPI or FUNC, MOD. to Update Date Field in Item Detail Sub-Header In PO

    Hi All,
    I'm working with SAP IS-Retail. In a PO, at the Item Detail, Import Tab, there are 2 sub-tabs Verif.4 and Verif. 5. This fields which are EIPO-NACD4 and EIPO-NACD5. When a new X-factory is entered for PO, this dates are deleted. I'm required to write a program to feed these fields of the required dates.
    So basically, the user will run the program, input the PO no., the range of Line items they want to use the date for and lastly input the date he/she wants to use to populate the Verif. 4/5 date field.
    Is there any BAPI's or Function Modules I can use to export the values to the EIPO fields.
    Thanks.

    This issue is resolve.
    I foung a Function Module to use. The FM is
    "EXPIMP_POSTING"
    Thanks all.

  • Update date field to database

    Hi All,
    I tried to update a date field to my database by using dataprovider, however, I got the following error "java.lang.RuntimeException: Number of conflicts while synchronizing: 1 SyncResolver.INSERT_ROW_CONFLICT row 1 Can't infer the SQL type to use for an instance of java.util.Date. Use setObject() with an explicit Types value to specify the type to use." Anyone can help me to resolve this problem?

    Also, following:
    http://blogs.sun.com/jfbrown/entry/using_creator_to_insert_into
    http://developers.sun.com/prodtech/javatools/jscreator/reference/techart/2/insert_row_in_table.html#4

  • Updating date field in db table.

    Hi ,
      I need to update a table which has a date field the and its of type dats.
    i need to insert  the date from the flat file. If the date field is blank it is updating in the table like
    "  /  /     ". if the date is 3/5/2006 it is updating properly.
    if the date is blank the table should be inserted with null values . it should not have " /  /    " also.
    can anyone help me on this.
    Regards,
    Rose.

    Use WRITE statement to transfer date into dats field.
    DATA : v_date TYPE d ,
           v_date1 TYPE d.
    WRITE v_date TO v_date1.
    Regards,
    Shailaja

  • Problem updating date field on user table

    Hi,
    I am having difficulty updating the value for a date field on a user defined table.  All of the other fields update fine.  Below is the code I am using.  Does anyone have any suggestions?  I have tried updating to both a date variable or a string variable.  Thanks in advance for your help
    Dim d As Date
        d = CDate("01/01/2004")
        pRecord.GetByKey (editForm.Items("Code").Specific.String)
        pRecord.UserFields("U_CardCode").Value = editForm.Items("CardCode").Specific.String
        pRecord.UserFields("U_CardNbr").Value = editForm.Items("CardNbr").Specific.String
        pRecord.UserFields("U_CardType").Value = editForm.Items("CardType").Specific.String
        pRecord.UserFields("U_ExpDate").Value = d
        pRecord.UserFields("U_Name").Value = editForm.Items("Name").Specific.String
        pRecord.UserFields("U_CVN").Value = editForm.Items("CVN").Specific.String
        pRecord.UserFields("U_Addr1").Value = editForm.Items("Addr1").Specific.String
        pRecord.UserFields("U_Addr2").Value = editForm.Items("Addr2").Specific.String
        pRecord.UserFields("U_City").Value = editForm.Items("City").Specific.String
        pRecord.UserFields("U_State").Value = editForm.Items("State").Specific.String
        pRecord.UserFields("U_Zip").Value = editForm.Items("Zip").Specific.String
        If editForm.Mode = fm_UPDATE_MODE Then
            pRecord.Update
        End If

    I think I have figured it out.  The cardtype field (which I was also updating) has a list of valid values.  If I didn't specify a value for this field none of the other fields would update either.  I'm still not sure of the reason for this behavior.

  • Setting and updating Date field in a jsp 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.

Maybe you are looking for