Created
June 16, 2019 08:18
-
-
Save akey7/4f103128b04fe8b80e523c89c3073e4d to your computer and use it in GitHub Desktop.
Timestamp in a string
This file contains hidden or 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 as dt | |
| now = dt.now() | |
| timestamp = f'{now.year}-{now.month}-{now.day}-{now.hour}-{now.minute}-{now.second}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment