cancel
Showing results for 
Search instead for 
Did you mean: 

to_date function in bods is giving wrong results.

Former Member
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

former_member18162
Active Participant
0 Kudos

Hello Venkata S,

Please reference the following post:

IMPORTANT: 2015 date conversion issue_all versions of SAP Data Services

Cheers!
Julie

former_member614539
Discoverer
0 Kudos

Solution wouldn´t be migrated to the new sap community plattform

Answers (2)

Answers (2)

Former Member
0 Kudos

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,

mageshwaran_subramanian
Active Contributor
0 Kudos

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.

Former Member
0 Kudos

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.