Return to Snippet

Revision: 9853
at November 25, 2008 20:41 by vasdee


Initial Code
proc format library=your.formats.library;
  picture oracle_datetime other='%0d/%0m/%0Y %0H:%0M:%0S' (datatype=datetime);
run;

proc format library=your.formats.library;
  picture oracle_date other='%0d-%0b-%0Y' (datatype=date);
run;

proc format library=your.formats.library;
  picture oracle_time other='%0H:%0M:%0S' (datatype=time);
run;

Initial URL


Initial Description
Annoyingly hard to find,  I'm sure others out there have felt the pain of converting sas dates to oracle date formats. 

example: 
     data _null_;  
          x_dt = datetime();  
          x_d = date();  
          put x_dt oracle_datetime.;  
          put x_d oracle_date.;  
     run;

Initial Title
Converting SAS datetime to oracle_datetime

Initial Tags
date, format

Initial Language
SAS