Date: Thu, 8 Jan 2009 16:40:34 -0500
Reply-To: Akshaya Nathilvar <akshaya.nathilvar@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Akshaya Nathilvar <akshaya.nathilvar@GMAIL.COM>
Subject: Re: Format Phone Number
In-Reply-To: <fe7128ad-f298-4c24-a048-44f522cd8b42@r32g2000vba.googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-1
Picture format will help:
Proc format;
picture $abc
low-high='(000)-000-0000' (prefix='(');
Run;
Data samp;
length pn $10;
input pn $;
np=input(pn,best.);
format np num.;
cards;
1234567890
9852352123
7524216781
;
Akshaya-
On Thu, Jan 8, 2009 at 4:12 PM, sdlenter <sdlentert@aol.com> wrote:
> In my sas dataset I have a variable called "phone" and it's in $10.
> format and appears like this
> 1234567890
> I need it to look like this
> (123)-456-7890
>
> Thanks
>
|