Hello Haiuko/Linli, I guess the code was okay. But at my end I got an error message the following message; 1124 array _time(*) start_time time: fail_time; ERROR: All variables in array list must be the same type, i.e., all numeric or character. ERROR: All variables in array list must be the same type, i.e., all numeric or character. ERROR: All variables in array list must be the same type, i.e., all numeric or character. ERROR: All variables in array list must be the same type, i.e., all numeric or character. ERROR: All variables in array list must be the same type, i.e., all numeric or character. ERROR: All variables in array list must be the same type, i.e., all numeric or character. ERROR: All variables in array list must be the same type, i.e., all numeric or character. ERROR: All variables in array list must be the same type, i.e., all numeric or character. ERROR: All variables in array list must be the same type, i.e., all numeric or character. ERROR: All variables in array list must be the same type, i.e., all numeric or character. ERROR: All variables in array list must be the same type, i.e., all numeric or character. ERROR: All variables in array list must be the same type, i.e., all numeric or character. ERROR: All variables in array list must be the same type, i.e., all numeric or character. ERROR: All variables in array list must be the same type, i.e., all numeric or character. ERROR: All variables in array list must be the same type, i.e., all numeric or character. 1125 do i=1 to dim(_time); 1126 date0=_time(i); 1127 if date0 ne . then output; 1128 end; 1129 format date0 mmddyy10.; --------- 48 ERROR 48-59: The format $MMDDYY was not found or could not be loaded. 1130 run; I guess the problem is with the start_time. I merged several files to obtain the data am supposed to "arrange using the code you gave me. I noticed that the start_time is in number format. I tried formatting it using mmddyy10 but it does seem to work. I have to export the data file to excel where I converted it to number. Because it appear to be in a format I can't tell (it appears in excel with the little green mark in front), i converted it in numeric format and then changed it into the date format 23/03/1981. Re-imported it into sas but still appear in the numeric form. I then ran the code you sent but got the above error message. Sas is still new to me, am just trying to get my way round it. While am at it trying to find out what the problem is, should you have an idea of what may have gone wrong please I would appreciate.Meanwhile, I didn't use the input file part, because my data was store in excel file so I just imported the whole file.
... View more