From: Dean on
I'm pulling date data from a Cube in character format, i.e.

2007 July
2007 August
2007 September


I'm trying to split this into a monyy7 date format using PROC SQL. Any
suggestions?
From: Arthur Tabachneck on
Dean,

You might be able to use something like:

data have;
input have_date & $20.;
cards;
2007 July
2007 August
2007 September
;

proc sql;
create table want as
select input(catt('1',
substr(scan(have_date,2),1,3),
scan(have_date,1)),date9.)
as want_date
format=monyy7.
from have;
quit;

HTH,
Art
-------------
On Jul 25, 8:49 am, Dean <dean.par...(a)gmail.com> wrote:
> I'm pulling date data from a Cube in character format, i.e.
>
> 2007 July
> 2007 August
> 2007 September
>
> I'm trying to split this into a monyy7 date format using PROC SQL. Any
> suggestions?

From: Dean on

That helps a lot - thanks very much Art



On Jul 26, 2:52 am, Arthur Tabachneck <art...(a)netscape.net> wrote:
> Dean,
>
> You might be able to use something like:
>
> data have;
>   input have_date & $20.;
>   cards;
> 2007 July
> 2007 August
> 2007 September
> ;
>
> proc sql;
>   create table want as
>     select input(catt('1',
>            substr(scan(have_date,2),1,3),
>            scan(have_date,1)),date9.)
>            as want_date
>       format=monyy7.
>         from have;
> quit;
>
> HTH,
> Art