Python code to get current year




If you are looking to get current year in integer format in Python programming language, then use below one

from datetime import date
current_year = date.today().year

Source:
https://www.quora.com/How-do-I-get-the-current-year-as-an-int-value-in-Python

About the Author

SRINI S

A passionate blogger. Love to share solutions and best practices on wordpress hosting, issues and fixes, excel VBA macros and other apps

Leave a Reply

Your email address will not be published. Required fields are marked *