[KLUG Members] Subtracting Time

Patrick McGovern members@kalamazoolinux.org
Tue, 02 Jul 2002 17:11:56 -0400


Just curious if any one has a way to find time differences for 24 hour
formats.  
An example of the program output data is below:

start_date         start_time        end_date           end_time
06/30/2002     06:30              06/30/2002       17:07

I want to find the time difference between the start time and the end
time.  
I need to subtract the end_time from the start_time.  I don't think the
dates 
matter much since the difference is obvious if the start time is
greater than 
the end_time and the data does not span more than 24 hours.

Does any one have a Unix shell script that will calculate this time
difference?
Pat