Help using Base SAS procedures

Delete last two digits from a numeric variable

Reply
N/A
Posts: 0

Delete last two digits from a numeric variable

Hello guys,
I want to reduce 12345678 into 123456.
It's a numeric variable.
Any hint!
x
Super Contributor
Posts: 359

Re: Delete last two digits from a numeric variable

Posted in reply to deleted_user
To keep it numeric floor(x/100);
N/A
Posts: 0

Re: Delete last two digits from a numeric variable

Thanks Flip,
I converted the variable from numeric to character to use sbstrn function and then converted back to numeric Smiley Wink
Ask a Question
Discussion stats
  • 2 replies
  • 1725 views
  • 0 likes
  • 2 in conversation