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 (October 2005, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 28 Oct 2005 18:44:45 +0000
Reply-To:     toby dunn <tobydunn@HOTMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         toby dunn <tobydunn@HOTMAIL.COM>
Subject:      Re: How to read a SAS date vlue?
Comments: To: sbindra@GMAIL.COM
In-Reply-To:  <1130521422.423285.42560@z14g2000cwz.googlegroups.com>
Content-Type: text/plain; format=flowed

SAmi,

Are your intial values SAS date values or are they text value, it makes a difference.

For text values simply do the following:

newdate = scan(date,1,' ') || ' ' || scan(date,3,' ') ;

for SAS date values I am not total sure how to get the months right but you can start with using the format mmyyw.d

Toby Dunn

From: Sami <sbindra@GMAIL.COM> Reply-To: Sami <sbindra@GMAIL.COM> To: SAS-L@LISTSERV.UGA.EDU Subject: How to read a SAS date vlue? Date: Fri, 28 Oct 2005 10:43:42 -0700

Hi All,

The data set contains date values. Read this and get the following output;

Input Data ----------------

Aug 29, 2004 Aug 29, 2004 Sep 29, 2004 Sep 29, 2004

Output Data ------------------

Aug 2004 Aug 2004 Sep 2004 Sep 2004

Thanks, Sami.


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