Skip to Content
avatar image
Former Member

to_date function in bods is giving wrong results.

Hi ,

While I'm trying to convert the below string into date time its giving wrong results for the year 2015

But till 2014 it was working fine can you please help me with this code.

     $G_Test = '01-JAN-15 17:30:35';

    $G_DATE =to_char( $G_Test, 'DD-MON-YYYY hh24:mi:ss');

    print('$G_DATE :                [$G_DATE]') ;

Result is 1915.01.01 17:30:35 but the expected result is 2015.01.01 17:30:35 till 2014 it was working fine but after this year is converting to 19.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Jan 06, 2015 at 04:52 PM

    Hello Venkata S,

    Please reference the following post:

    IMPORTANT: 2015 date conversion issue_all versions of SAP Data Services

    Cheers!
    Julie

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 05, 2015 at 12:09 AM

    I guess "Century Change Year" is set to 15 in Tools->Options->Data->General in Designer.So two digit year 15 is interpreted as 1915.Two-digit years less than this value will be interpreted as 20XX.

    To solve your problem,use a four digit year as part of your input or  set "Century Change Year" to a higher possible value.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thanks a lot for the suggestion Magesh. I tried this option it worked for me. I'll try to to at the server level and update you.

  • avatar image
    Former Member
    Jan 05, 2015 at 09:32 AM

    Hello,

    I have the same problem and the Magesh's tip works fine.

    Could be the '15' century digit was set up during the standard instalation of SAP BODS, I guess.

    Thank you,

    Add comment
    10|10000 characters needed characters exceeded