<p>给出附件说明<br/></p><p>【书名】The Essential Guide to SAS Dates and Times</p><p>【作者】Derek P. Morgan<br/>【出版社】SAS Publishing<br/>【版本】1st Edition<br/>【出版日期】June 30, 2006<br/>【文件格式】PDF<br/>【文件大小】2.22MB<br/>【页数】176<br/>【ISBN出版号】1590478843<br/>【资料类别】计量经济学<br/>【市面定价】$29.95<br/>【扫描版还是影印版】影印版<br/>【是否缺页】否<br/>【关键词】Programming, Statistical, SAS <br/>【内容简介】Why does SAS use January 1, 1960, as its arbitrary reference date? How do you convert a value such as 27 January, 2003, into SAS dates? You?ll find the answers to these questions and much more in this compact reference that makes it easy to understand how to use and manipulate dates, times, and datetimes in SAS. Novice-to-intermediate users will find the clear, task-focused examples and explanations of formats and functions invaluable; experienced users will appreciate discussions of topics such as intervals and international date and time formats. Included is a bonus "Quick Reference Guide" listing all the formats (with examples) on one handy page.<br/>【目录】<br/>Table of Contents<br/>Acknowledgments ....................................................................................................vii<br/>1 Introduction to Dates and Times in SAS ................................................ 1<br/>1.1 How Does It Work? (January 1, 1960 and Midnight as Zero) .......................... 2<br/>1.2 Internal Representation (Storage as Integers or Real Numbers).......................... 2<br/>1.3 External Representation (Basic Format Concepts)............................................. 3<br/>1.4 Date and Time as Numeric Constants in SAS.................................................. 3<br/>1.5 System Options Related to Dates................................................................... 5<br/>1.6 Length and Numeric Requirements for Date, Time, and Datetime .................... 12<br/>2 Displaying SAS Date, Time, and Datetime Values as Dates and Times<br/>as We Know Them............................................................................. 15<br/>2.1 How Do I Use a Format? ............................................................................ 16<br/>2.2 So Just How Many Built-in Formats Are There for Dates and Times?................. 18<br/>2.3 A Quick Note About Date Formats, Justification, and ODS............................. 19<br/>2.4 Detailed Discussion of Each Format ............................................................. 19<br/>2.4.1 Date Formats .................................................................................. 19<br/>2.4.2 Time Formats .................................................................................. 43<br/>2.4.3 Datetime Formats ............................................................................ 47<br/>2.5 Creating Custom Date Formats Using the VALUE Statement of<br/>PROC FORMAT........................................................................................ 54<br/>2.6 Creating Custom Date Formats Using the PICTURE Statement of<br/>PROC FORMAT........................................................................................ 56<br/>2.7 The PUT() Function and Formats.................................................................. 60<br/>3 Converting Dates and Times into SAS Date, Time,<br/>and Datetime Values.......................................................................... 63<br/>3.1 Avoiding the Two-Digit Year Trap................................................................ 64<br/>3.2 Using Informats ......................................................................................... 65<br/>3.3 The INFORMAT Statement.......................................................................... 66<br/>3.3.1 Using Informats with the INPUT Statement .......................................... 66<br/>3.3.2 Informats with the INPUT() Function...................................................67<br/>3.3.3 When the Informat Does Not Match the Data Being Read.................... 68<br/>3.4 Listing and Discussion of Informats .............................................................. 70<br/>3.4.1 Date Informats ................................................................................ 70<br/>3.4.2 Time Informats ................................................................................ 75<br/>3.4.3 Datetime Informats .......................................................................... 77<br/>3.4.4 ANYDT and Its Variants ................................................................... 77<br/>4 Date and Time Functions .................................................................... 85<br/>4.1 Current Date and Time Functions................................................................. 86<br/>4.2 Extracting Pieces from SAS Date, Time, and Datetime Values ......................... 86<br/>4.3 Creating Dates, Times, and Datetimes from Numbers .................................... 89<br/>4.4 Calculating Intervals .................................................................................. 93<br/>4.4.1 Calculating Elapsed Time with DATDIF() and YRDIF() ..........................93<br/>4.4.2 The Basics of SAS Intervals............................................................... 96<br/>4.4.3 The Interval Calculation Functions: INTCK and INTNX......................... 98<br/>5 Deeper into Dates and Times with SAS ............................................. 107<br/>5.1 Macro Variables and Dates......................................................................108<br/>5.1.1 Automatic Macro Variables............................................................108<br/>5.1.2 Putting Dates into Titles ..................................................................109<br/>5.1.4 Using %SYSFUNC() to Create Dates, Times, and Datetimes in<br/>Macro Variables ...........................................................................110<br/>5.1.4 Using CALL SYMPUT() and SYMGET() with Dates, Times, and<br/>Datetimes .....................................................................................111<br/>5.2 Shifting SAS Date and Time Intervals .........................................................113<br/>5.3 Graphing Dates ......................................................................................122<br/>5.4 The Basics of PROC EXPAND ...................................................................127<br/>5.4.1 Capabilities of PROC EXPAND.......................................................127<br/>5.4.2 Using PROC EXPAND to Convert to a Higher Frequency ...................129<br/>5.4.3 Using PROC EXPAND to Convert to a Lower Frequency.....................130<br/>5.4.4 Using PROC EXPAND to Interpolate Missing Values ..........................132<br/>5.4.5 The OBSERVED= Option for the CONVERT Statement in<br/>PROC EXPAND.............................................................................133<br/>5.5 International Date, Time, and Datetime Formats and Informats......................136<br/>5.5.1 “EUR” Formats and Informats..........................................................137<br/>5.5.2 “NL” Formats................................................................................140<br/>5.5.3 Specific Language Date Formats and Informats.................................143<br/>5.6 Other Software and Their Dates (Excel, Oracle, DB2)..................................144<br/>Appendix A Quick Reference Guide to SAS Date, Time, and Datetime<br/>Formats ................................................................................149<br/>Index .....................................................................................................151</p>
|