Skip to Main Content
Hands-On SAS for Data Analysis
book

Hands-On SAS for Data Analysis

by Harish Gulati
September 2019
Beginner to intermediate content levelBeginner to intermediate
346 pages
7h 35m
English
Packt Publishing
Content preview from Hands-On SAS for Data Analysis

Altering the data type

While processing data, you will frequently need to change data types. Even if the data is of good quality, where numbers have been stored as numerical and all date fields have been specified with the correct date format, transformations or derivations from them may be required to perform analysis.

Some of the commonly used transformations and derivations for a data analyst where the data type is altered are the following:

  • Converting from numerical into character
  • Converting from character into numerical
  • Using a date or datetime format
  • Extracting information from data

To convert a number into a character, use the PUT function. The syntax is as follows:

Character_variable = put(numeric_variable, informat.);

To convert ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Big Data Analytics with SAS

Big Data Analytics with SAS

David Pope, Subhashini S Tripathi
An Introduction to SAS Visual Analytics

An Introduction to SAS Visual Analytics

Tricia Aanderud, Rob Collum, Ryan Kumpfmiller

Publisher Resources

ISBN: 9781788839822Supplemental Content