Feb 19, 2007 · Note that the TODAY function returns the current date. The above source code generates the following output: dt=17216 day=19 month=2 year=2007 qtr=1 weekday=2 week=7 _ERROR_=0 _N_=1 Date functions work on DATES and time functions work on TIME. If we apply a date function to a SAS DATETIME variable we will get errors.
Jun 06, 2012 · YD = Complete calendar days between two dates as though the end date is in the same year as the start date. YM = Complete calendar months between two dates as though the end date is in the same year as the start date. MD = complete calendar days between two dates as though the month and year of the end date is the same as the start date. Caution!