0

To convert a timestamp to a date, we use:

import time

print(time.strftime("%a, %d %b %Y %H:%M:%S +0000", time.localtime(1638631984)))

The result is:

Sat, 04 Dec 2021 12:33:04 +0000

enter image description here

But I would like to collect this relative value (in minutes):

Relative: 42 minutes ago

How should I proceed to achieve this result?

Digital Farmer
  • 675
  • 3
  • 11
  • 37

0 Answers0