Posted By

vasdee on 11/25/08


Tagged

date format sas


Versions (?)

Converting SAS datetime to oracle_datetime


 / Published in: SAS
 

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; xdt = datetime(); xd = date(); put xdt oracledatetime.; put xd oracledate.; run;

  1. proc format library=your.formats.library;
  2. picture oracle_datetime other='%0d/%0m/%0Y %0H:%0M:%0S' (datatype=datetime);
  3. run;
  4.  
  5. proc format library=your.formats.library;
  6. picture oracle_date other='%0d-%0b-%0Y' (datatype=date);
  7. run;
  8.  
  9. proc format library=your.formats.library;
  10. picture oracle_time other='%0H:%0M:%0S' (datatype=time);
  11. run;

Report this snippet  

You need to login to post a comment.