LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (July 2004, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Fri, 16 Jul 2004 14:11:03 -0400
Reply-To:   "Huang, Ya" <yhuang@AMYLIN.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "Huang, Ya" <yhuang@AMYLIN.COM>
Subject:   Re: Proc SQL - date conversion
Comments:   To: Xin Zhang <xinzhang90@YAHOO.COM>

On Fri, 16 Jul 2004 10:40:06 -0700, Xin Zhang <xinzhang90@YAHOO.COM> wrote:

>I tried to retrieve data from MS SQL Server 2000 from SAS 8. I got >problems to convert date between SQL Server and SAS. sql_table is a >table in the my SQL Server database. One of columns is act_date with >datetime datatype. The value in the column is today's date >(7/16/2004) > >LIBNAME d_live odbc dsn = live uid = xzhang password = xxxx >read_isolation_level=ru ; > >proc sql noprint; >create table t_1 as >SELECT * FROM d_live.sql_table >where act_date = today(); >quit; > >How do I write this PROC SQL. Thanks. > >Xin

try:

where act_date=put(today(),mmddyy10.);


Back to: Top of message | Previous page | Main SAS-L page