datetime get now code example
Example 1: python datetime now
import datetime
print(datetime.datetime.now()) #datetime.datetime.now() is the syntax
Example 2: get current date datetime
from datetime import date
today = date.today()
print("Today's date:", today)