Professional Documents
Culture Documents
seconds.fraction)
Functions
Functions take values and convert the
way the data is stored
Function Use
Datapart Takes a datetime attribute, extracts
the date part and stores it as a date
attribute
Timepart Takes a datetime attribute, extracts the
time part and stores it as a Time attribute
Functions
Function Use Use
Put(attribute, format) Returns a (character) value
using a specified format.
Input(attribute, informat) Returns the value produced
when a SAS expression is
read using a specified
informat.
Formats and Informats
Formats determine how a variable is
displayed; informats determine how a
variable id read. The tend to be similar.
FORMATNAMEw.d
Formats and Informats always contain a
period (.)
SAS makes assumptions about the best
display for a given w.d specification
Some Useful Formats
YEARw. Writes date values as the year
MONNAMEw. Writes date values as the
quarter of the year
DOWNAMEw. Writes data values as the the
name of the day of the week
QTRw. Writes date values as the
quarter of the year
writes dates as the Julian day of
JULDAYw. the year (yyddd). For w=3
the output is ddd.