Date: Wed, 8 Feb 2006 14:33:10 -0500
Reply-To: Chang Chung <chang_y_chung@HOTMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Chang Chung <chang_y_chung@HOTMAIL.COM>
Subject: Re: Date Format
Hi,
Man, I hate it when I am making mistakes... The correct code is below:
Cheers,
Chang
proc format;
picture yymmdt
/* '01jan2000:00:00:01'dt - '31dec2100:00:00:00'dt */
1262304001 - 4449513600 = '%0y%0m' (datatype=datetime) /* fixed */
other = 'out of range'
;
picture yymondt
1262304001 - 4449513600 = '%0y%b' (datatype=datetime)
other = 'out of range'
;
run;
data _null_;
dt = '08feb2006:14:08:01'dt;
put dt= :best. dt= :yymmn6. dt= :yymmdt. dt= :yymondt.;
run;
/* on log
dt=1455026881 dt=****** dt=0602 dt=06FEB
*/
|