The first and second arguments of the yrdif( ) function tell SAS, respectively, the start and end date of the desired interval. Review the assignment statement that is used to calculate the values for the variable age. Let's look at an example in which these five functions are used. So, for example, the SAS Julian date for Januis 2008021.
The value of ddd must be between 001 and 365 (or 366 for a leap year).
You don't need to put anything in between the parentheses for those two functions.Ī Julian date is defined in SAS as a date in the form yyddd or yyyyddd, where yy or yyyy is a two-digit or four-digit integer that represents the year and ddd is the number of the day of the year. That is, they both return the current date as defined as the date on which the SAS program is executed. The date( ) and today( ) functions are equivalent. The functions that can be used to create date values include: