From: db on 14 Jun 2010 03:28 Hi, I am trying to make date variable to be a date format and time variable to be a time format. But my current logic give me just character format in date and time variable. Could anyone tell me why date and time don't convert to mmddyy10 and time8.0 format ? Thanks data temp; format date :mmddyy10. time :time8.0; input date $ time $ stock1 stock2; cards; 01/04/2010 7:00:00 5989.5 1115.25 01/04/2010 7:01:00 5998.5 1116 01/04/2010 7:02:00 5996.5 1115.75 01/04/2010 7:05:00 6000 1115.5 01/04/2010 20:55:00 6042 1128.5 01/04/2010 20:56:00 6040.5 1128.5 01/04/2010 20:57:00 6040.5 1128.75 01/04/2010 20:58:00 6040.5 1128.5 01/04/2010 20:59:00 6040.5 1128.5 01/04/2010 21:00:00 6036 1128.75 01/05/2010 7:00:00 6035.5 1128.5 01/05/2010 7:01:00 6037 1128.5 01/05/2010 7:02:00 6037 1128.5 01/05/2010 7:03:00 6038 1128.5 01/05/2010 7:06:00 6038.5 1128.25 01/05/2010 20:56:00 6042 1131.5 01/05/2010 20:57:00 6042.5 1132 01/05/2010 20:58:00 6042 1132 01/05/2010 20:59:00 6041.5 1131.75 01/05/2010 21:00:00 6041.5 1132.25 01/06/2010 7:00:00 6039 1129.75 01/06/2010 7:01:00 6035 1129.25 01/06/2010 7:02:00 6035 1129.5 01/06/2010 7:07:00 6035 1129.25 01/06/2010 20:38:00 6036 1134 01/06/2010 20:39:00 6038.5 1134.25 01/06/2010 20:59:00 6035.5 1133 01/06/2010 21:00:00 6035.5 1133 ; run;
From: db on 14 Jun 2010 04:11 On Jun 14, 11:28 am, db <daronnebonn...(a)gmail.com> wrote: > Hi, > > I am trying to make date variable to be a date format and time > variable to be a time format. But my current logic give me just > character format in date and time variable. Could anyone tell me why > date and time don't convert to mmddyy10 and time8.0 format ? > > Thanks > > data temp; > > format date :mmddyy10. > time :time8.0; > input date $ time $ stock1 stock2; > cards; > 01/04/2010 7:00:00 5989.5 1115.25 > 01/04/2010 7:01:00 5998.5 1116 > 01/04/2010 7:02:00 5996.5 1115.75 > 01/04/2010 7:05:00 6000 1115.5 > 01/04/2010 20:55:00 6042 1128.5 > 01/04/2010 20:56:00 6040.5 1128.5 > 01/04/2010 20:57:00 6040.5 1128.75 > 01/04/2010 20:58:00 6040.5 1128.5 > 01/04/2010 20:59:00 6040.5 1128.5 > 01/04/2010 21:00:00 6036 1128.75 > 01/05/2010 7:00:00 6035.5 1128.5 > 01/05/2010 7:01:00 6037 1128.5 > 01/05/2010 7:02:00 6037 1128.5 > 01/05/2010 7:03:00 6038 1128.5 > 01/05/2010 7:06:00 6038.5 1128.25 > 01/05/2010 20:56:00 6042 1131.5 > 01/05/2010 20:57:00 6042.5 1132 > 01/05/2010 20:58:00 6042 1132 > 01/05/2010 20:59:00 6041.5 1131.75 > 01/05/2010 21:00:00 6041.5 1132.25 > 01/06/2010 7:00:00 6039 1129.75 > 01/06/2010 7:01:00 6035 1129.25 > 01/06/2010 7:02:00 6035 1129.5 > 01/06/2010 7:07:00 6035 1129.25 > 01/06/2010 20:38:00 6036 1134 > 01/06/2010 20:39:00 6038.5 1134.25 > 01/06/2010 20:59:00 6035.5 1133 > 01/06/2010 21:00:00 6035.5 1133 > ; > > run; I think I solved it. input date :mmddyy10. time :time8.0 stock1 stock2;
|
Pages: 1 Prev: Features of Project-drive.net Next: data manipulation question |