Python dzisiaj - 1 dzień
from datetime import datetime, timedelta
yesterday = datetime.today() - timedelta(days = 1 )
MzanziLegend
from datetime import datetime, timedelta
yesterday = datetime.today() - timedelta(days = 1 )
from datetime import date
today = date.today()
print("Today's date:", today)
from datetime import datetime
# Current date time in local system
print(datetime.now())
print(datetime.date(datetime.now())) ##For Date
today = datetime.today().strftime("%Y-%m-%d %H:%M:%S")
from datetime import date
current_date = date.today()
print("today's date is ",current_date))
import datetime
date_object = datetime.date.today()
print(date_object)