1from datetime import date
2
3today = date.today()
4print("Today's date:", today)
1from datetime import date
2//today is an object so you can get the day, month and year by
3//treating it as an object. eg: today.day, today.month, today.year
4today = date.today()
5print("Today's date:", today)
1
2from datetime import datetime
3
4# Current date time in local system
5print(datetime.now())
6print(datetime.date(datetime.now())) ##For Date
7