01-16-2015 06:55 PM
I would like to use SAS to calculate the time elapsed in minutes between two time series, start_time and end_time and store it in a third column, time_elapsed. The data looks as such and is stored in an excel spreadsheet in the following hour-minute format:
Is there anyone with an idea as to how to proceed?
01-16-2015 07:05 PM
If you read it into SAS correctly you will get time values.
The SAS function INTCK can calculate many different intervals between times, dates or datetimes.
Also in SAS
End_time - Start_time would equal the number of seconds. So ElapsedMinutes = (end_time - start_time)/60;
01-16-2015 07:17 PM
Something like this...
format start_time end_time time_elapsed time5.;
input @1 start_time time5. @7 end_time time5.;
time_elapsed = end_time - start_time;