From the course: SAS Programming for R Users, Part 1
Unlock this course with a free trial
Join today to access over 22,600 courses taught by industry experts.
Demo: Labels, formats, and informats - SAS Tutorial
From the course: SAS Programming for R Users, Part 1
Demo: Labels, formats, and informats
- [Narrator] So at this point you might be asking yourself do I really need to know the number of days since January 1st, 1960 to actually work with SAS date formats? Well, the answer of course is no, that would be way too much of a pain. We use what are called informats, meaning your data's already in the appropriate format. So here I'm creating a data set called employees and I only have two variables, name, which is character, and birthday. And you'll notice here, I'm applying an informat, so I'm using the colon to tell SAS the data I'm reading in is already in the specified format. It's already in month, day, year, eight format. And if you go down to the data lines you'll see, I have my name, in this case Jill, and then a date, in this case January 1st, 1960, and Jack, 5-11-1988. So that way I don't have to actually calculate the number of days. And of course I'm reading in more than one observation per line so remember your trailing addAt symbol. And I'm going to read in this…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
Creating datasets manually in the DATA step2m 39s
-
(Locked)
Demo: Creating and viewing the data table2m 40s
-
(Locked)
Importing raw data files4m 41s
-
(Locked)
Demo: Importing data5m 9s
-
(Locked)
Reporting data6m
-
(Locked)
Enhanced reporting: Labels and formats4m 54s
-
(Locked)
The FORMAT statement2m 54s
-
(Locked)
Demo: Labels, formats, and informats3m
-
-