Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

REMOVE LAST 4 CHARCTER

Former Member
0 Likes
434

HI ALL

I HAVE ONE FIELD, ITS VALUE IS '500632732008' AND ITS DATA TYPE IS CHAR.

I WANT TO REMOVE '2008' FROM THE VALUE.

WHAT SHOULD I DO?

PLZ HELP ME.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
419

Hey try this

w_level_03 = strlen( W_STRING ).

lv_offset = w_level_03 - 4.

w_string2 = w_string +(lv_offset).

or

w_string2 = w_string +0(lv_offset).

Eg:-

str = "testing1234".

int offset = strlen( str ) - 4.

str = str+0(offset).

Write : str.

Then the output would be testing.

Regards,

Chandru

HI ALL

I HAVE ONE FIELD, ITS VALUE IS '500632732008' AND ITS DATA TYPE IS CHAR.

I WANT TO REMOVE '2008' FROM THE VALUE.

WHAT SHOULD I DO?

PLZ HELP ME.

1 REPLY 1
Read only

Former Member
0 Likes
420

Hey try this

w_level_03 = strlen( W_STRING ).

lv_offset = w_level_03 - 4.

w_string2 = w_string +(lv_offset).

or

w_string2 = w_string +0(lv_offset).

Eg:-

str = "testing1234".

int offset = strlen( str ) - 4.

str = str+0(offset).

Write : str.

Then the output would be testing.

Regards,

Chandru