Created
March 9, 2021 22:45
-
-
Save chrisvoncsefalvay/12b44139e3233099c73c92a94d640456 to your computer and use it in GitHub Desktop.
DTG formatting in Python
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 | |
t = datetime.now() | |
tstring = f"{t.day:02}{t.hour:02}{t.minute:02}{t.strftime('%b').upper()}{t.year}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment