how to change the starting date in dt python code example
Example 1: date.month date time
import datetime
dt = datetime.datetime.today()
print dt.year
print dt.month
print dt.day
Example 2: datetime year python
import datetime
now = datetime.datetime.now()
print(now.year, now.month, now.day, now.hour, now.minute, now.second)
Example 3: how to add two different times in python
import datetime as dt
t1 = dt.datetime.strptime('12:00:00', '%H:%M:%S')
t2 = dt.datetime.strptime('02:00:00', '%H:%M:%S')
time_zero = dt.datetime.strptime('00:00:00', '%H:%M:%S')
print((t1 - time_zero + t2).time())