|
On Tue, 29 Apr 2008 19:09:06 -0400, Arthur Tabachneck <art297@NETSCAPE.NET>
wrote:
>Harry,
>
>Who am I to question data_null_?
>
>Regardless, I got it to work with input--input. E.g.,
>
>data have;
> input num_dates;
> cards;
>20060607
>20050822
>20080429
>;
>
>data want;
> set have;
> format date date9.;
> date=input(input(num_dates,$12.),yymmdd8.);
Or just
date=input(num_dates,yymmdd12.);
>run;
>
>HTH,
>Art
Also, there is an all-numeric approach: use numeric functions and operators
to extract the year, month, and date components, then use the MDY function
to construct the SAS date.
>-------
>On Tue, 29 Apr 2008 18:50:47 -0400, Hari Nath <hari_s_nath@YAHOO.COM>
>wrote:
>
>>Hi all,
>>
>>I have a sas dataset which has numeric dates in the form 20060822
>>all my proc contents says is that
>>
>> # Variable Type Len Label
>>
>>137 START_DT1 Num 8 START_DT1
>>
>>I want to find a way to read them and format it to mmddyy8.
>>
>>am not successful so far....can someone guide me here.....
>>
>>Many thanks
>>hari.
|