I'm struggling to convert a seconds timestamp to a date because I keep receiving these errot messages that I do not fully understand.
secs = 1673715600000
I want this to return the corresponding date of this timestamp.
So I tried the following:
(1)
secstodate = date.fromtimestamp(secs).strftime("%A, %B %d, %Y %I:%M:%S")
Output:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: [Errno 22] Invalid argument
(2)
secstodate2= time.strftime('%m/%d/%y %H:%M:%S', time.gmtime(secs))
Output:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: [Errno 22] Invalid argument
I find this strange, because this seems to be the exact same syntax that im seeing used elsewhere on stack overflow.
What am I doing wrong?