Created
July 10, 2021 15:00
-
-
Save garraflavatra/ecda3975a277113188779fa4be7dd9a6 to your computer and use it in GitHub Desktop.
Get a formatted date in Python. See https://www.w3schools.com/python/gloss_python_date_format_codes.asp for an overview of all formatting codes.
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
import datetime | |
x = datetime.datetime.now() | |
print(x.strftime("%Y-%m-%d %H:%M:%S")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment