programming-examples/python/Date/Python program to convert the date to datetime (midnight of the date).py

4 lines
133 B
Python
Raw Normal View History

2019-11-15 12:59:38 +01:00
from datetime import date
from datetime import datetime
dt = date.today()
print(datetime.combine(dt, datetime.min.time()))