About Lesson
Today():-
Today() metho defined in the date class to get a date object containing the current local date.
import datetime print(datetime.date.today()) dat=datetime.date.today() print(dat) Output 2023-06-22 2023-06-22
|
from datetime import date today=date.today() print(“Current Year “,today.year) print(“Current Month “,today.month) print(“Current Day “,today.day) Output Current Year 2023 Current Month 6 Current Day 22 |