Date: Mon, 20 Jan 1997 14:28:36 -0500
Reply-To: chenxi@EASYWAY.NET
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: chenxi@EASYWAY.NET
Subject: Re: string -> date -> string
Content-Type: text/plain; charset="us-ascii"
Tim:
Is this what you want?
data a;
a='970117';
b=input(a,yymmdd.);
b=b+1;
a=put(b,yymmdd6.);
run;
Chen Xi, Ph.D
PharmClint Co.
====================================================
>Hi SAS users,
>
> I have a string variable yymmdd (e.g 970117). I would like
> to convert it into date variable so that I can do some opertaions
> to add one day or one week to it, that is, yymmdd + 1 (970118) and
> then convert it back as a string variable.
>
> Any idea?
>
>Thanks!
>
>Tim Pi
>
>
|