🔒 This topic is solved and locked.
Need further help from the community? Please
sign in and ask a new question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Posted 03-17-2015 06:32 AM
(26195 views)
Hi,
I want to remove the values after decimal places. For ex -
13.265 should become 13
-12.514 should become -12
Regards,
Nikunj
1 ACCEPTED SOLUTION
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Use the integer function: Truncated_Variabel=Int(Variable);
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Well, you need to round the value. There are several options:
floor(value) = takes the minimum e.g. 13.265 becomes 13
ceil(value) = takes the maximum e.g 13.265 becomes 14
Then ther's the round() function:
SAS(R) 9.2 Language Reference: Dictionary, Fourth Edition
There are many other functions for working with numbers (int() is another).
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
use round function ex: round(variable_name,2) else use formats.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Use the integer function: Truncated_Variabel=Int(Variable);