Skip to Content
avatar image
Former Member

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 !

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

6 Answers

  • Best Answer
    avatar image
    Former Member
    Oct 06, 2008 at 09:32 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 06, 2008 at 09:25 AM

    Hi,

    Use the Datetrans function in the mapping and change it accordingly to ur format.

    You specify the input format and output format according to JDBC.

    Regards

    Krish

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 06, 2008 at 10:06 AM

    Hi,

    Use DateTrans function. Double click the DateTrans and put yyyy-MM-dd under format of source date, put yyyy/MM/dd under target Formate. Do rest of the mapping like this.

    Date -


    > Substring (0,10) --->DateTrans ---> TargetDate

    Regards,

    Sarvesh

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 06, 2008 at 10:11 AM

    Source Date -


    > Substring (0,10) --->DateTrans ---> TargetDate

    source date format is YYYY-MM-DD

    target date foramat is YYYY/MM/DD

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 06, 2008 at 10:33 AM

    Hi,

    No need to use substring function.

    SRC-->Transform Date(Date Trans function)->tgt

    Right click on Tranform Date and set properties

    Format of Source data - yyyy-MM-dd

    Target Format - yyyy/MM/dd

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 06, 2008 at 09:25 AM

    Hi

    You can use standard DateTrans function

    DateTrans

    Converts date format I to another date format O.

    Thanks

    Gaurav

    Add comment
    10|10000 characters needed characters exceeded