Pythonic way to combine datetime.date and datetime.time objects Pythonic way to combine datetime.date and datetime.time objects python python

Pythonic way to combine datetime.date and datetime.time objects


It's in the python docs.

import datetimedatetime.datetime.combine(datetime.date(2011, 1, 1),                           datetime.time(10, 23))

returns

datetime.datetime(2011, 1, 1, 10, 23)


matomo