I have a few timestamps in a database that I would like to trim down to only about 10 timestamps, from most latest to oldest. All the timestamps in the DB were made using time() in python.
Create timestamp:
_timestamp = time.time()
Timestamps:
1435652632.92778
1435652633.01
1435652633.07
1435652633.13
1435652642.71371
1435652642.77
1435652675.13
1435652675.22
1435652717.74
1435652735.11
1435652735.16
1435652735.24
How can I ask python to remove the oldest timestamp?
I currently convert the timestamp to readable format using the below string in my script.
print datetime.datetime.fromtimestamp(1434615010.27858)
>>2015-06-18 08:10:10.278580
I have no code yet to remove the oldest timestamps, however I would appreciate some help with this please.