| 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 |
| In-Reply-To: | <200603061410.k26BlmiH000438@malibu.cc.uga.edu> |
| Content-Type: | text/plain; format=flowed |
|---|
carf4F@GMAIL.COM wrote:
>I wish to have from
>
>date
>19251213
>
>to
>
>date2
>25-12
>
>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
thoughts.
First, you will always have troubles lurking until you start storing your
dates as
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.
HTH,
David
--
David L. Cassell
mathematical statistician
Design Pathways
3115 NW Norwood Pl.
Corvallis OR 97330
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
|