Hi. Is the date value in the imported dataset a numeric SAS date value, or a character string? It's easy either way, though. if character (assuming this is YYYY-MM-DD; otherwise, just flip the numbers around accordingly): M = SUBSTR(DATEVAL,6,2) ; /* extract characters 6-7 */ D = SUBSTR(DATEVAL,9,2); /* extract characters 9-10 */ Y = SUBSTR(DATEVAL,1,4); /* extract characters 1-4 */ (and these could be converted to numeric values if needed). If DATEVAL is a (formatted) numeric SAS date, there are functions to return date components as numeric values: D = DAY(DATEVAL); M = MONTH(DATEVAL); Y = YEAR(DATEVAL);
... View more