Date: Wed, 31 Jan 2001 08:54:05 -0500
Reply-To: Edward Heaton <HEATONE@WESTAT.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Edward Heaton <HEATONE@WESTAT.COM>
Subject: Re: date format
Content-Type: multipart/alternative;
Kin and Brian;
There exists an informat called YYMMN4. that will read your values.
Ed
Edward Heaton, SAS Senior Statistical Systems Analyst,
Westat (An Employee-Owned Research Corporation),
1550 Research Boulevard, Room 2018, Rockville, MD 20850-3195
Voice: (301) 610-4818 Fax: (301) 294-3992
mailto:EdwardHeaton@westat.com <mailto:EdwardHeaton@westat.com>
http://www.westat.com <http://www.westat.com>
-----Original Message-----
From: Shilling, Brian [PRI] [mailto:BShillin@PRIUS.JNJ.COM]
Sent: Tuesday, January 30, 2001 2:40 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Re: date format
Kin,
As far as I know, there is no informat for YYMM.
Your best bet is to tack on '01' to the end of each number, making them
YYMMDD.
Then, using the YYMMDDw. informat, you can read in the values making them
SAS dates.
Then, you should be able to just subtract one from the other, and divide to
find the number of months.
Hope this helps
Brian
-----Original Message-----
From: kin tang [SMTP:kintang1806@YAHOO.COM]
Sent: Tuesday, January 30, 2001 2:10 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: date format
Hello there,
I have a dataset that has date format consisting year
and month only. How do I read it into SAS as a SAS
date format? After it is read in, I need to calculate
the the number of month between the first record and
the last record of each id. That is the number of
month between '9605' and '9901'. Thanks.
Kin
Example:
id time
1 9901
1 9812
1 9702
1 9605
2 9811
2 9703
__________________________________________________
Get personalized email addresses from Yahoo! Mail - only $35
a year! http://personal.mail.yahoo.com/ <http://personal.mail.yahoo.com/>
[text/html]