LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (March 2003, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 26 Mar 2003 10:49:57 +0530
Reply-To:     Arunk@DELHI.TCS.CO.IN
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Arun Kumar <Arunk@DELHI.TCS.CO.IN>
Subject:      Re: insert char into a char variable
Comments: To: Shan Putnam <shan8299@HOTMAIL.COM>
Content-Type: text/plain; charset="us-ascii"

u can use something like this...........

Newvar=substr(yourvar,1,2)||':'||substr(yourvar,3,2);

Obviously here it is assumed that the var. yourvar is of char length otherwise it needs to be modified accordingly...........

Arun Kumar

Shan Putnam <shan8299@HOTMAIL.COM> Sent by: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> 03/26/2003 07:05 AM Please respond to Shan Putnam

To: SAS-L@LISTSERV.UGA.EDU cc: Subject: insert char into a char variable

i have a char variable and need to add a semicolon.

i.e.,

1000 1200 1230 0400

changed to

10:00 12:00 12:30 04:00

any suggestions would be greatly appreciated

shan


Back to: Top of message | Previous page | Main SAS-L page