Working with SAS Formats and SAS Dates - Paul W Dickman
SAS Seminar, MEB 2012-02-27
Working with SAS Formats and SAS Dates
Anna Johansson MEB, Karolinska Institutet
Slides also available on
teaching/sas/index.html
1
Outline ? Formats and Informats ? SAS Date variables ? Converting CHAR and NUM into SAS Dates ? Extracting birthdate from PNR ? SAS Date functions ? Calculating age in exact years ? Calculating age at diagnosis from PNR and diagnosis date ? YEARCUTOFF option for two-digit years
2
Formats and Informats A format is a layout specification for how a variable should be printed or displayed.
An informat is a specification for how raw data should be read.
SAS contains many internal (pre-defined) formats and informats.
To see a list of all internal formats and informats, type in the command line help formats
then type in the Index window of the Help page formats, by category
3
Formats
There are four different categories of formats:
Category Character Date and time ISO Numeric
Description
instructs SAS to write character data values from character variables.
instructs SAS to write data values from variables that represent dates, times, and datetimes
instructs SAS to write date, time, and datetime values using the ISO 8601 standard.
instructs SAS to write numeric data values from numeric variables.
4
Examples. Numeric formats
Stored Value
12345.9876 12345.9876 12345.9876 12345.9876 12345.9876 12345.9876
Format
10.4 10.2 8.2 COMMA11.4 BEST8. BEST4.
Displayed Value
12345.9876 12345.99 12345.99 12,345.9876 12345.99 12E3 (E3=103)
5
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
- baoxian lan everest clinical research services inc toronto canada
- character functions in sql with examples paper
- character fuctios
- date functions in sql server with examples
- making sas dates from all your character dates
- handling missing values in the sql procedure oarc stats
- dates and times with lubridate cheat sheet gitlab
- release 2 2 ibm
- sql convert procedure
- to char function with dates
Related searches
- word for working with someone
- working with others synonym
- synonym for working with others
- synonym for working with people
- word for working with others
- working with people synonym
- interview question working with others
- another word for working with others
- working with toddlers interview questions
- working with teens with autism
- working with preschoolers with autism
- working with people with dementia