Date: Wed, 3 Sep 2008 10:24:56 -0500
Reply-To: "./ ADD NAME=Data _null_," <iebupdte@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "./ ADD NAME=Data _null_," <iebupdte@GMAIL.COM>
Subject: Re: Picture format
In-Reply-To: <07fffb6a-0487-46dc-950f-0d79b48e7613@8g2000hse.googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-1
From the documentation...
Any directive that generates numbers can produce a leading zero, if
desired, by adding a 0 before the directive. This applies to %d, %H,
%I, %j, %m, %M, %S, %U, and %y. For example, if you specify %y in the
picture, then 2001 would be formatted as '1', but if you specify %0y,
then 2001 would be formatted as '01'.
On 9/3/08, Learner <pradev@gmail.com> wrote:
> Hi,
>
> 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
>
|