SAS OnlineTutor HomeFAQ PageSuggested Learning PathsContents+Search||next

Transforming Data with SAS Functions
Lesson Overview


Introduction

When planning modifications to SAS data sets, be sure to examine the many SAS functions that are available. SAS functions are prewritten expressions that provide programming shortcuts for many calculations and manipulations of data.

This lesson teaches you how to use a variety of functions, such as those shown in the table below. You learn to convert data from one data type to another, to work with SAS date and time values, and to manipulate character variable values.


Function Description Form Sample Value
YEAR Extracts the year value from a SAS date value. YEAR(date) 2002
MONTH Extracts the month value from a SAS date value. MONTH(date) 12
DAY Extracts the day value from a SAS date value. DAY(date) 5


This lesson contains 75 pages and takes approximately 90-120 minutes to complete.


Objectives

Twelve commonly used functions are presented. If you complete the instruction about all functions within the lesson, you will be able to

  • convert character data to numeric data
  • convert numeric data to character data
  • create SAS date values
  • extract the month and year from a SAS date value
  • extract, edit, and search character variable values.


Prerequisites

Before taking this lesson, you should have completed the following lessons:

Introduction to SAS Programming

Creating SAS Data Sets (at least one of the following)

Creating and Modifying Variables

||next


Copyright © 2002 SAS Institute Inc., Cary, NC, USA. All rights reserved.

Terms of Use & Legal Information | Privacy Statement