Hi Everybodies
I have been going round in circles and need the guidance of the geniuses out there.
I have a list:{{17362, 2, 3, “2015-06-15 06:17:19”, 40, 33, 1}, {17362, 2, 3, “2015-06-15 06:55:41”, 46, 26, 1}, {17362, 2, 2, “2015-06-15 06:58:21”, 36, 20, 1}}
What i am trying to achieve is to process the list but i need to process the records and get the value of item 7 of the record and also the next record if it is not more than 15 minutes older than the first record. If it is, then i need to store record one’s results set my new start time to item 2’s date and then process record 2 store the value of item 7 then process the next record and see if that is within 15 mins of record 2, if so add its value to the result.
the best method i have found with the dates is to turn them into epoch dates and compare against these.
EG "2015-06-15 06:17:19 in epoch is 1434346339, so by running set expiry to (epoch + 900) give me my 15 minus i am looking into.
Where i am seeming to get stuck is achieving a result like the example below in a text file:
Time Count
6:17 - 6:32 1
6:55 - 7:10 2
Any help is greatly appreciated, also any clarification i can help with, please let me know.
Many Thanks
Chris