Skip to content

Instantly share code, notes, and snippets.

@topherPedersen
Created July 12, 2019 08:02
Show Gist options
  • Save topherPedersen/a3cd1a9edee3421d1db2ef22a8c4d606 to your computer and use it in GitHub Desktop.
Save topherPedersen/a3cd1a9edee3421d1db2ef22a8c4d606 to your computer and use it in GitHub Desktop.
Get Current Year, Month, and Day as Integers in Python 3 with the datetime Module
# REFERENCE: https://bit.ly/2JtjSto
import datetime
now = datetime.datetime.now()
print(now.year)
print(now.month)
print(now.day)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment