03-06-2012 12:43 PM
you may be looking for: Date() which returns the current date. BUT your variable name ending in DT makes me think you are actually comparing a DATETIME value, not a date. if that is the case you may be looking for DATEPART(market_row_eff_dt) ge Date().
03-06-2012 02:20 PM
You can use DATE() to get today's date and DATETIME() to get the current time as a datetime value.
You can also use &SYSDATE9 to get the date that the program session started. and &SYSTIME to get the time it started.
You can specify a date literal in SAS by using quoted string followed by the letter d. Use the date. format. For example today is
For datetime use dt as the suffix. "01MAR2012:14:18"dt
You can use %SYSFUNC to let you call DATE() and generate the string.
Are you referencing an external database? or just referencing SAS datasets? Different databases will have different ways of storing dates (datetime versus date only for example) and specifying a specific date (does it use ddMMMyyyy format like SAS or does it want YYYYMMDD or some other format.)