Exploring, predicting and reporting with SAS Visual Analytics and SAS Visual Statistics

Removing 1st Two characters from a string

Accepted Solution Solved
Reply
Highlighted
Occasional Contributor
Posts: 10
Accepted Solution

Removing 1st Two characters from a string

Hi all, I want to remove 1st two Character from a string i.e "MX2312323". I want to remove 'MX'. How i will do that. Please help me out


Accepted Solutions
Solution
‎09-28-2017 09:42 AM
Respected Advisor
Posts: 2,174

Re: Removing 1st Two characters from a string

Posted in reply to subha_4225

Look up the SUBSTR function in SAS Help.

 

Something like this will work

 

newvalue = substr(oldvalue,3);
--
Paige Miller

View solution in original post


All Replies
Solution
‎09-28-2017 09:42 AM
Respected Advisor
Posts: 2,174

Re: Removing 1st Two characters from a string

Posted in reply to subha_4225

Look up the SUBSTR function in SAS Help.

 

Something like this will work

 

newvalue = substr(oldvalue,3);
--
Paige Miller
Occasional Contributor
Posts: 10

Re: Removing 1st Two characters from a string

Posted in reply to PaigeMiller
Thank u...
Occasional Contributor
Posts: 10

Re: Removing 1st Two characters from a string

Posted in reply to PaigeMiller

Thank You.

SAS Employee
Posts: 417

Re: Removing 1st Two characters from a string

[ Edited ]
Posted in reply to subha_4225
☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 4 replies
  • 252 views
  • 2 likes
  • 3 in conversation