Date: Thu, 5 Oct 2006 06:37:42 -0700
Reply-To: jessica.donato@GMAIL.COM
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: jessica.donato@GMAIL.COM
Organization: http://groups.google.com
Subject: Re: Changing date format
In-Reply-To: <BAY114-F24FB1279F59C2054B0C8F387120@phx.gbl>
Content-Type: text/plain; charset="iso-8859-1"
Thanks Gwen! I appreciate your response and it indeed worked.
Gwenael Besnier wrote:
> Hi,
>
> if you have a SAS date then you can use the funstions year, month and day.
> If you have a string, then transform your string in a SAS date using the
> input function and then use the functions year, month and day.
>
> data toto;
> set toto;
> y=year(mydate);
> m=month(mydate);
> d=day(mydate);
> run;
>
> HTH
> Gwen
>
>
> >From: jessica.donato@GMAIL.COM
> >Reply-To: jessica.donato@GMAIL.COM
> >To: SAS-L@LISTSERV.UGA.EDU
> >Subject: Changing date format
> >Date: Thu, 5 Oct 2006 04:46:30 -0700
> >
> >Hi guys. I would appreciate your help with this one. Im looking to
> >convert a sas date monthdayyear into three separate variables month,
> >day, and year. What do you think is the easiest way to do this? An
> >array to form the new variables? There must be a more direct way of
> >taking the fist two numbers and separating them from the next two, etc.
> > Any suggestions would be appreciated! Thank you...
>
> _________________________________________________________________
> Die neue MSN Suche Toolbar mit Windows-Desktopsuche. Suchen Sie gleichzeitig
> im Web, Ihren E-Mails und auf Ihrem PC! Jetzt neu! http://desktop.msn.de/
> Jetzt gratis downloaden!
|