+ Start a Discussion
bhanu_prakashbhanu_prakash 

How to get only second number

Hi,
I need to display only number after /
EX :   20 /12
Output : 12

How can i achevie with validation ?
Ankur Saini 9Ankur Saini 9
Hi Bhanu

Use this:

string input = '20/12';
string output = input.substringAfter('/'));

Thanks
Ankur Saini
http://mirketa.com
bhanu_prakashbhanu_prakash
thanks bro
can we acheive if / is there is need to store in other field
EX:  1.     20/12
               Ouput :  Field 1 = 20  , Field 2 = 12
        2.    12
               Output : Fiedl 1 =       , Field 2 = 12
 
BALAJI CHBALAJI CH
Hi Bhanu,

If you need to split and store, try this

string input = '20/12';
string[] output = input.split('/');

Result:
Output[0] = 20, Output[1] = 12

Let us know if that works for you.

Best Regards,
BALAJI