I have a variable that contains date and times. I would like to convert these into epoch time, perform some basic calculations and convert the output back into human readable format. Here is a workflow with specific data and examples:
--------------------------------------------------------
--------------------------------------------------------
(1) Phase I: variable $date contains the following data:
Jan 08 10:06:18 EST
Jan 08 10:07:56 EST
Jan 08 10:07:23 EST
Jan 08 10:08:31 EST
Jan 08 10:08:11 EST
Jan 08 10:08:52 EST
Jan 08 10:09:44 EST
Jan 08 10:21:22 EST
(2) Phase II: convert each line into epoch
Jan 08 10:06:18 EST = 1231409178
.....
.....
Jan 08 10:21:22 EST = 1231410082
(3) Phase III: Perform some calculations:
ex: subtract first line from last line to get lag time:
1231410082 - 1231409178 = 904
(4) Phase IV: Convert the calculation to human readable time and print
"15.07 minutes"
--------------------------------------------------------
--------------------------------------------------------
Thanks,
Justin
--- You must not fight too often with one enemy, or you will teach him all your tricks of war.
--------------------------------------------------------
--------------------------------------------------------
(1) Phase I: variable $date contains the following data:
Jan 08 10:06:18 EST
Jan 08 10:07:56 EST
Jan 08 10:07:23 EST
Jan 08 10:08:31 EST
Jan 08 10:08:11 EST
Jan 08 10:08:52 EST
Jan 08 10:09:44 EST
Jan 08 10:21:22 EST
(2) Phase II: convert each line into epoch
Jan 08 10:06:18 EST = 1231409178
.....
.....
Jan 08 10:21:22 EST = 1231410082
(3) Phase III: Perform some calculations:
ex: subtract first line from last line to get lag time:
1231410082 - 1231409178 = 904
(4) Phase IV: Convert the calculation to human readable time and print
"15.07 minutes"
--------------------------------------------------------
--------------------------------------------------------
Thanks,
Justin
--- You must not fight too often with one enemy, or you will teach him all your tricks of war.