Bringing SAS files with dates to an SQL server

Reply
New Contributor
Posts: 2

Bringing SAS files with dates to an SQL server

I am using proc SQL to create datasets on the SQL server.  I have in the SAS dataset  the format mm/dd/yy, but when I create the dataset on the server I get 31DEC1959:00:00:00.000.

How can I get the SQL server to show a date with the format mm/dd/yy...I don't need all the time stamp info.

Please help!

J

Super User
Posts: 3,110

Re: Bringing SAS files with dates to an SQL server

This link may be helpful:

http://support.sas.com/documentation/cdl/en/acreldb/65247/HTML/default/viewer.htm#n0h4i25zq3t58en1lg...

I suspect your column is being created with a data type of SQL_TIMESTAMP. You can confirm this by browsing the table in MS SQL Server Management Studio.

Try setting the data type explicitly using the DBTYPE = option, as referred to in the above link.

Ask a Question
Discussion stats
  • 1 reply
  • 177 views
  • 0 likes
  • 2 in conversation