Date: Thu, 5 Oct 2006 07:57:19 -0400
Reply-To: Gerhard Hellriegel <gerhard.hellriegel@T-ONLINE.DE>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Gerhard Hellriegel <gerhard.hellriegel@T-ONLINE.DE>
Subject: Re: Changing date format
depends on. If it is really a SAS date (only formatted like
mmddyy
use the MONTH(), DAY() YEAR()-functions.
If it is a string, you should first convert it to SAS dates with
sasdate=input(date,mmddyy.);
and then use the functions.
On Thu, 5 Oct 2006 04:46:30 -0700, jessica.donato@GMAIL.COM wrote:
>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...
|