Date: Wed, 3 Sep 2008 09:26:19 -0700
Reply-To: Learner <pradev@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Learner <pradev@GMAIL.COM>
Subject: Re: Picture format
Content-Type: text/plain; charset=ISO-8859-1
On Sep 3, 11:38 am, gerhard.hellrie...@T-ONLINE.DE (Gerhard
> Question is, do you really have time-variables? Not chracter variables
> which look like time variable?
> If that is the case, you should convert that to real time-variables:
> data a;
> put tx time8.;
> put ty time8.;
> If you have already numeric time - variables, siply assign a wider time-
> format. time8. should do what you want.
> On Wed, 3 Sep 2008 08:12:49 -0700, Learner <pra...@GMAIL.COM> wrote:
> >I have a time variable with hours and minutes for example, 16:20,
> >2:27, 6:18 etc. I want to add zero if the length of the time variable
> >is less than 5 like 02:27. Please let me know how to do this by using
> >the picture format.
> >Thank you,
> >Learner- Hide quoted text -
> - Show quoted text -
The time variable I mentioned is a character variable. I got my
desired value by using
if length(time) ne 5 then time1=compress('0'||time);
But, I want to try it using the picture format. Iam not sure if I can
use picture format in this. Just want to learn new stuff.