Created
March 29, 2023 23:35
-
-
Save apfister/95df4aad1a6416eff7870ab29352b25b to your computer and use it in GitHub Desktop.
convert a timestamp value to a string
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import datetime | |
ts = 1546734359 | |
n = datetime.fromtimestamp(ts) | |
date_formatted = n.strftime('%Y-%m-%d %H:%M:%S') | |
# print(date_formatted) | |
return date_formatted |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment