check_circleMark as learned
Python Datetime | today method
schedule Jul 1, 2022Last updated
The class method
date.today() can be used to return the current local date.
date object representing current local date.
To return the current local date:
from datetime import datecurrent_date = date.today()print(current_date)2020-03-20
current_date here is timezone-naive.
Join our newsletter for updates on new DS/ML comprehensive guides (spam-free)
Published by Arthur Yanagisawa
Edited by 0 others
Did you find this page useful?
Ask a question or leave a feedback...
Enjoy our search
Hit / to insta-search docs and recipes!