Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to get the current year in python

from datetime import date
current_date = date.today() 
print("Current date: ", current_date)
print("Current year:", current_date.year)
 
PREVIOUS NEXT
Tagged: #current #year #python
ADD COMMENT
Topic
Name
6+4 =