DATA Step, Macro, Functions and more

Date Format

Not applicable
Posts: 1

Date Format

I am just starting to use PC SAS at work and we have linked it to our SQL server so i can see our tables there. My problem is that all of the date fields come over in the following format: 01MAR2009 00:00:00. I know that SQL stores it with the timestamp and programs like Microsoft Access and SQL Server software can some how strip it off and makes the date viewable as mm/dd/yyyy. I was wondering if there was a setting somewhere in PC SAS that can make date fields easier to use instead of me having to format it every damn time. Thank you.
Super Contributor
Super Contributor
Posts: 3,176

Re: Date Format

Posted in reply to mdkryptoking
I believe there are "import" options where SAS will scan the incoming standard "datetime" variables for a date and assign a SAS DATE formatted variable, rather than a datetime variable. Check the SAS DOC for handling datetime columns, options USEDATE= and SCANTIME=.

Scott Barry
SBBWorks, Inc.
Ask a Question
Discussion stats
  • 1 reply
  • 2 in conversation