Thursday, July 21, 2011

New feature in SAS 9.3 - LIBNAME statement to connect to JMP dataset

New feature in SAS 9.3:


LIBNAME JMP associates a libref with a JMP data table and enables you to read and write JMP data tables.
http://support.sas.com/documentation/cdl/en/whatsnew/64209/HTML/default/viewer.htm#lestmtsrefwhatsnew93.htm 

Wednesday, July 6, 2011

How to create a SAS date from "YYYY-MM-DD HH:MM:SS"

Problem
How to pull a SAS date from a text field formatted as YYYY-MM-DD HH:MM:SS.

Solution
data myTable;
set myTable;
informat dateVar date9.;
format dateVar date9.;
dateVar = input(substr(temp_dt,1,10), yymmdd10.);
run;