Date: Wed, 13 Aug 2003 15:23:09 +0300
Reply-To: arto raiskio <arto.raiskio@SUOMENPOSTI.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: arto raiskio <arto.raiskio@SUOMENPOSTI.COM>
Subject: time. as 00:01:01
how can I output time with a leading zero?
for example, in getting a datetime value from a SQL table, the date is
always mmddyy (or can be formatted) but the timepart(datevar) is formatted
as 0:00:00 if hours are from 0 to 9
so how can time be formatted as 09:01:01 instead of 9:01:01 ?
data _null_;
x = '13aug2003:09:01:01:0'd;
put x=:mmddyy6.;put x=:time9.;run;
x=081303
x=4:25:30
|