How do I read the unix timestamp from Python?

Asked 1 years ago, Updated 1 years ago, 63 views

How do I write a string (such as "1284101485") that stores the unix timestamp format in Python? I thought I could write time.strftime but I get a TypeError.

import time
print time.strftime("%B %d %Y", "1284101485")

Traceback (most recent call last): File "", line 1, in TypeError: argument must be 9-item sequence, not str

python datetime unix-timestamp strftime

2022-09-22 22:28

1 Answers

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.