I have a web form which has 2 input fields, \"StartDate\" and \"StartTime\". I convert the StartDate field\'s string into a Python datetime object
StartDate
datetime
If you can load the time into a datetime.time, you can use the following code
datetime.time
import datetime dt = datetime.datetime(2012, 2, 12) tm = datetime.time(1, 30) combined = dt.combine(dt, tm) print(combined)
2012-02-12 01:30:00