|
Hi,
You should look at the "input" and "put" function in your base SAS
manual. Example: x=input(string,yymmdd6.);
calculation....
string=put(x,yymmdd6.);
Regards,
Bernard Tremblay
\\\|///
\\ - - //
( @ @ )
+------oOOo-(_)-oOOo----------+---------------------------------+
| Bernard Tremblay | |
| La Capitale | Tel: (418) 646-2401 |
| | Fax: (418) 646-5960 |
| | Int: bernard@capitale.qc.ca |
+-----------------------------+---------------------------------+
| Imaginasys enr | Res: (418) 878-4447 |
| | Int: bertrem@quebectel.com |
+---------------Oooo----------+---------------------------------+
oooO ( )
( ) ) /
\ ( (_/
\_)
>>>From owner-sas-l@UGA.CC.UGA.EDU Mon Jan 20 18:57 EST 1997
>>>Mime-Version: 1.0
>>>Content-Transfer-Encoding: 7bit
>>>Date: Mon, 20 Jan 1997 17:10:19 -0500
>>>From: Tim Pi <fmrco!timpi@UUNET.UU.NET>
>>>Subject: string -> date -> string
>>>Comments: To: SAS User Group <uunet!UGA.CC.UGA.EDU!SAS-L@uunet.uu.net>
>>>To: Multiple recipients of list SAS-L <SAS-L@UGA.CC.UGA.EDU>
>>>
>>>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
|