Home Up Contact Us

SAS Date/Time Converter

 

Home
ASAP
SLIST Editor
Resources
Links
Tips
Tech Teaser

Ever wanted to quickly check what an unformatted SAS date or datetime value means?  Of course you have. 

You probably write a quick data _null_ step to put the value to the Log with the appropriate format.

You might use a macro to do the job, but if you're running SAS on a Windows platform, download this free, easy-to-use utility to convert SAS date, datetime and time values to something meaningful, and visa versa.

So...Flashing download graphic

  1. Download the SAS catalog, saving it in an appropriate directory e.g. c:\ssutil.
     
  2. Assign a library to this directory in your autoexec.sas  e.g. libname ssutil 'c:\ssutil';
     
  3. Customise the toolbox in the SAS Log and Editor windows to add a button to start the Date Converter:

    - Right click on the toolbox and select Customize... Then select the Customize tab.

    - Press the New Tool Icon and:

        - Set the Command to: afa c=ssutil.dateconv.dateconv.frame

        - Set the Help Text and Tip Text fields to: Date Converter

        - Press the Help button if you're not sure what to do.
     

  4. Alternatively, define a macro command in your autoexec, like this:

     

    libname ssutil 'c:\ssutil';

    %macro dc / cmd;
       afa c=ssutil.dateconv.dateconv.frame;
    %mend;

     

    You can then just enter  dc  on the command line to invoke the Date Converter.

Home ] Up ]


Copyright 2011 Softscape Solutions Pty Ltd