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 (September 2007, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 6 Sep 2007 08:37:37 -0700
Reply-To:     "Terjeson, Mark" <Mterjeson@RUSSELL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Terjeson, Mark" <Mterjeson@RUSSELL.COM>
Subject:      Re: Date help
Comments: To: cherub <cherub2life@YAHOO.COM>
In-Reply-To:  A<794857.39885.qm@web33314.mail.mud.yahoo.com>
Content-Type: text/plain; charset="us-ascii"

Hi,

The PUT() function converts numeric to string. The INPUT() function converts string to numeric.

The SAS internal date type is just a number variable that contains the number of days since 1/1/1960.

data test; x = input('01-Jan-07',date9.); format x date9.; put x=;

y = input('02-May-2001',date11.); format y date9.; put y=; run;

Hope this is helpful.

Mark Terjeson Senior Programmer Analyst, IM&R Russell Investments

Russell Investments Global Leaders in Multi-Manager Investing

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of cherub Sent: Thursday, September 06, 2007 8:24 AM To: SAS-L@LISTSERV.UGA.EDU Subject: Date help

Now I have a sas data, all of date is store as chacater date. for example '01-Jan-07' or '02-May-2001',

Does someone know how to convert this kind of data into numeric sas date?

Thanks a lot

--------------------------------- Be a better Globetrotter. Get better travel answers from someone who knows. Yahoo! Answers - Check it out.


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