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 (August 2003, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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


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