From the course: SAS® 9.4 Cert Prep: Part 10 Manipulating Data with Functions
Unlock this course with a free trial
Join today to access over 22,600 courses taught by industry experts.
Using a generic informat to read dates - SAS Tutorial
From the course: SAS® 9.4 Cert Prep: Part 10 Manipulating Data with Functions
Using a generic informat to read dates
- [Instructor] Dates can be written as text strings in many different ways. A special informat you can use to read a variety of dates is the ANYDTDTE informat. You might be thinking, "Why not always use it "instead of the specific date informats "such as date or MMDDYY?" One reason is that it does take a bit longer to process the values with the ANYDTDTE informat. You also might prefer to use a particular informat to ensure that converted dates all follow a designated layout. But it's good to know you have this option if you are unsure about the format of incoming dates or you're reading a column that has dates written in various ways. One thing to note when you use this informat if the date is ambiguous such as 6/01/2018 which could be interpreted as either June 1st or January 6th, SAS uses the DATESTYLE= system option to determine the order of month, day, and year. The default value for the DATESTYLE= option is LOCALE.…
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
-
-
-
-
-
-
(Locked)
Handling column type35s
-
(Locked)
Converting column type1m 18s
-
(Locked)
Converting character values to numeric values1m 33s
-
(Locked)
Using a generic informat to read dates1m 33s
-
(Locked)
Converting the type of an existing column1m 46s
-
(Locked)
Converting numeric values to character values1m 2s
-
Demo: Using the INPUT function to convert column types7m 9s
-
(Locked)
Demo: Using the PUT function to convert column types3m 38s
-
(Locked)