Last active
March 1, 2016 22:23
-
-
Save AndrewHazelden/f9186b76473344bbe493 to your computer and use it in GitHub Desktop.
Use Python to generate a date and time stamp as 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
import datetime | |
# Get the current time | |
now = datetime.datetime.now() | |
# Make a note of the date and time in a string | |
# Example: 2015-12-05 12:34:24 PM | |
textDocument = '# Scene Generated: ' + now.strftime('%Y-%m-%d %H:%M:%S %p') + '\n' | |
print textDocument |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment