Review the output to convince yourself that the program does as claimed. When you are satisfied you understand the use of the mmddyy informat and the ddmmyy format, launch and run the SAS program. If nothing appears (or alternatively an " s") in a ddmmyy format, as it does here for the date1 variable, SAS will display forward slashes between the month, day and year. The " c" that appears in the format for the date3 variable tells SAS to display colons between the month, day and year. The " b" that appears in the format for the date2 variable tells SAS to display blank spaces between the month, day and year. Dates before January 1, 1960, are negative numbers dates after January 1, 1960, are positive numbers. SAS can perform calculations on dates ranging from A.D. Well, let's be a little more specific here about that ddmmyy format. SAS date value is a value that represents the number of days between January 1, 1960, and a specified date. Here, the dates are read in using the mmddyy informat and are displayed in the rearranged ddmmyy format. Don't worry - SAS will let you know if you misspecify the width of the format! Also, note that the way that we format dates can be completely independent of the way that they are informatted. Note, in particular, that the width of the mmddyy informat (6, 8, or 10) tells SAS what form of the date it should expect. First, review the INPUT statement and the corresponding forms of the Apdate in the DATALINES statement.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
January 2023
Categories |