|Date: ||Mon, 6 Mar 2006 17:50:05 -0800|
|Reply-To: ||David L Cassell <davidlcassell@MSN.COM>|
|Sender: ||"SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>|
|From: ||David L Cassell <davidlcassell@MSN.COM>|
|Subject: ||Re: Date, year, and month|
|Content-Type: ||text/plain; format=flowed|
>I wish to have from
>I know year and date function, but || produced
>Obs DATE date2
> 1 19251231 1925 12
I see that you have received a lot of help already. But let me lob in my
First, you will always have troubles lurking until you start storing your
SAS date variables. Then you can *display* using any date format that you
like, whenever you like.
Second, your problem above looks like you saved things as intermediate
character variables and then concatenated them, forgetting that there
are fixed lengths, padded on the right with blanks. Or (worse) you
stored things in macro variables first, then concatenated them. You'll
want to learn about character variables in SAS, and then you'll realize that
dates should defintiely be in SAS date variables.
David L. Cassell
3115 NW Norwood Pl.
Corvallis OR 97330
Express yourself instantly with MSN Messenger! Download today - it's FREE!