03-21-2018 12:12 PM - edited 03-21-2018 12:12 PM
I have a simple problem I want to solve. I have a column where the output is, ex. 1303/0000/1. But I only need '1303' that I'll eventually convert into a currency value later.
03-21-2018 12:17 PM
For this they have invented the SUBSTR function:
SALES_NPV = SUBSTR(SALES_NPV, 1, 4);
This function is very basic. I would recommend you have a look at the other SAS functions as well.
03-21-2018 01:35 PM
I can name that tune with 0 functions:
length sales_npv $ 4;
There's only room to save the first four characters, once the length has been defined.